Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Robert Kern
Chris Barker wrote: > Travis E. Oliphant wrote: > >> I like the depth option, and that could be used with the current >> interface without too much difficulty, I think. >> >> This question does come up quite often and should probably be addressed. > > Yes, it has, but the depth option was discus

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Robert Kern
Chris Barker wrote: > hmmm. Everyone posting so far seems to be positive on this idea, but I'm > not so sure. A few thoughts: > > 1) change is bad. It may be worth it, but this decision needs to be made > very differently than if we were starting from scratch. > > 2) apparently svn merge sucks

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Chris Barker
Travis E. Oliphant wrote: > I like the depth option, and that could be used with the current > interface without too much difficulty, I think. > > This question does come up quite often and should probably be addressed. Yes, it has, but the depth option was discussed too, and while it might so

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Chris Barker
hmmm. Everyone posting so far seems to be positive on this idea, but I'm not so sure. A few thoughts: 1) change is bad. It may be worth it, but this decision needs to be made very differently than if we were starting from scratch. 2) apparently svn merge sucks compared to other merge technolog

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Chris Barker
Scott Ransom wrote: > I wasn't at all arguing that having complex data chopped and > downcast into an int or float container was the right thing to do. indeed, it is an clearly bad thing to do -- but a bug magnet? I'm not so sure, surely, anyone that had any idea at all what they were doing with

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Scott Ransom
On Fri, Jan 04, 2008 at 04:31:53PM -0700, Timothy Hochberg wrote: > On Jan 4, 2008 3:28 PM, Scott Ransom <[EMAIL PROTECTED]> wrote: > > > On Friday 04 January 2008 05:17:56 pm Stuart Brorson wrote: > > > >> I realize NumPy != Matlab, but I'd wager that most users would > > > >> think that this is

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Robert Kern
Zachary Pincus wrote: > Hello all, > >> That's well and good. But NumPy should *never* automatically -- and >> silently -- chop the imaginary part off your complex array elements, >> particularly if you are just doing an innocent assignment! >> Doing something drastic like silently throwing half

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Zachary Pincus
Hello all, > That's well and good. But NumPy should *never* automatically -- and > silently -- chop the imaginary part off your complex array elements, > particularly if you are just doing an innocent assignment! > Doing something drastic like silently throwing half your data away can > lead to a

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Stuart Brorson
I realize NumPy != Matlab, but I'd wager that most users would think that this is the natural behavior.. >>> >>> Well, that behavior won't happen. We won't mutate the dtype of the >>> array because of assignment. Matlab has copy(-on-write) semantics >>> for things like slices while we

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Timothy Hochberg
On Jan 4, 2008 3:28 PM, Scott Ransom <[EMAIL PROTECTED]> wrote: > On Friday 04 January 2008 05:17:56 pm Stuart Brorson wrote: > > >> I realize NumPy != Matlab, but I'd wager that most users would > > >> think that this is the natural behavior.. > > > > > > Well, that behavior won't happen. We

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Gael Varoquaux
On Fri, Jan 04, 2008 at 03:53:41PM -0700, Charles R Harris wrote: >Matlab support for different types was sort of kludged on. Matlab was >intended for computational convenience, not control of data types, and >started out as pretty much all doubles and double complex, it didn't >(do

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 2:37 PM, Stuart Brorson <[EMAIL PROTECTED]> wrote: > On Fri, 4 Jan 2008, Stuart Brorson wrote: > > > > I realize NumPy != Matlab, but I'd wager that most users would think > that this is the natural behavior.. Matlab support for different types was sort of kludged on. Matlab

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Scott Ransom
On Friday 04 January 2008 05:17:56 pm Stuart Brorson wrote: > >> I realize NumPy != Matlab, but I'd wager that most users would > >> think that this is the natural behavior.. > > > > Well, that behavior won't happen. We won't mutate the dtype of the > > array because of assignment. Matlab has c

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 7:15 AM, Matthew Brett <[EMAIL PROTECTED]> wrote: > > I agree. I find those pages to be really bad, actually. To have better > > informations, you should get into the mailing list of the respective > > projects. > > Just to extend this holiday special: > > I found the mozilla DVCS di

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Stuart Brorson
>> I realize NumPy != Matlab, but I'd wager that most users would think >> that this is the natural behavior.. > > Well, that behavior won't happen. We won't mutate the dtype of the array > because > of assignment. Matlab has copy(-on-write) semantics for things like slices > while > we have

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 6:36 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > On Jan 4, 2008 2:05 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > > > > On Jan 5, 2008 5:36 AM, Charles R Harris <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > A quick google for benchmarks show that a year ago,

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Matthew Brett
> I agree. I find those pages to be really bad, actually. To have better > informations, you should get into the mailing list of the respective > projects. Just to extend this holiday special: I found the mozilla DVCS discussion informative: http://weblogs.mozillazine.org/preed/2007/04/version_c

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Robert Kern
Stuart Brorson wrote: > On Fri, 4 Jan 2008, Stuart Brorson wrote: > >>> I just discovered this today. It looks like a bug to me. Please >>> flame me mercilessly if I am wrong! :-) > > FWIW, here's what Matlab does: > >>> A = rand(1, 4) + rand(1, 4)*i > > A = > >Columns 1 through 3 > >

Re: [Numpy-discussion] pre-initialized arrays

2008-01-04 Thread Stuart Brorson
>> I realize NumPy != Matlab, but I'd wager that most users >> would think that this is the natural behavior. > > I would not find it "natural" that elements of my float > array could be assigned complex values. OK, then NumPy should throw an exception if you try to make the assignemnt. I tried

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 6:41 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On Jan 4, 2008 2:17 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > Instead of devising our own arguments, read this: > > > > http://bazaar-vcs.org/BzrVsHg > > > > and the mercurial response therein.

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Robert Kern
Charles R Harris wrote: > On Jan 4, 2008 2:05 PM, David Cournapeau <[EMAIL PROTECTED] > > wrote: > bzr is not tied to linux. > > It is, in that development is funded by Canonical, but I haven't used > either on windows, so don't have any idea how they compare in that

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Stuart Brorson
>> Sometimes you need to initialize an array using zeros() before doing >> an assignment to it in a loop. If you assign a complex value to the >> initialized array, the imaginary part of the array is dropped. Does >> NumPy do a silent type-cast which causes this behavior? Is this >> typecast a f

Re: [Numpy-discussion] pre-initialized arrays

2008-01-04 Thread Alan G Isaac
On Fri, 4 Jan 2008, Stuart Brorson apparently wrote: > I realize NumPy != Matlab, but I'd wager that most users > would think that this is the natural behavior. I would not find it "natural" that elements of my float array could be assigned complex values. How could it be a fixed chunk of memor

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 2:17 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > > > Instead of devising our own arguments, read this: > > http://bazaar-vcs.org/BzrVsHg > > and the mercurial response therein. I saw that, but thought it is more marketing than technical. Turned me off, actually, last thing I w

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Stuart Brorson
On Fri, 4 Jan 2008, Stuart Brorson wrote: >> I just discovered this today. It looks like a bug to me. Please >> flame me mercilessly if I am wrong! :-) FWIW, here's what Matlab does: >> A = rand(1, 4) + rand(1, 4)*i A = Columns 1 through 3 0.7833 + 0.7942i 0.6808 + 0.0592i 0.461

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 2:05 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 5:36 AM, Charles R Harris <[EMAIL PROTECTED]> > wrote: > > > > > > > > A quick google for benchmarks show that a year ago, hg was a bit faster > and > > generated smaller repositories than bzr, but I don't think

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 6:17 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > > On Jan 4, 2008 10:05 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > > On Jan 5, 2008 5:36 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > A quick google for benchmarks show that a year ago, hg was a b

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Eric Firing
I have been using mercurial for some time now. I just discovered that the introductory documentation has been improved and consolidated in an online book-in-progress: http://hgbook.red-bean.com/hgbook.html Eric David Cournapeau wrote: > On Jan 5, 2008 5:36 AM, Charles R Harris <[EMAIL PROTECT

[Numpy-discussion] branches/maskedarray patch + lost password

2008-01-04 Thread Pierre GM
All, Here's a patch to the current version of svn/numpy/branches/maskedarray, that corrects several bugs. I tried to commit it to the server itself, but I unfortunately lost my password (or maybe I never had a password for numpy branches in the first place). Could anybody in charge of the SVN

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Stuart Brorson
> I just discovered this today. It looks like a bug to me. Please > flame me mercilessly if I am wrong! :-) H after a little more playing around, I think it's indeed true that NumPy does a typecast to make the resulting assignment have the same type as the LHS, regardless of the type of

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Pierre GM
On Friday 04 January 2008 16:08:54 Stuart Brorson wrote: > Sometimes you need to initialize an array using zeros() before doing > an assignment to it in a loop. If you assign a complex value to the > initialized array, the imaginary part of the array is dropped. Does > NumPy do a silent type-cast

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Ondrej Certik
On Jan 4, 2008 10:05 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 5:36 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > > > > A quick google for benchmarks show that a year ago, hg was a bit faster and > > generated smaller repositories than bzr, but I don't think the

[Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Stuart Brorson
NumPy gurus -- I just discovered this today. It looks like a bug to me. Please flame me mercilessly if I am wrong! :-) Sometimes you need to initialize an array using zeros() before doing an assignment to it in a loop. If you assign a complex value to the initialized array, the imaginary part

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 5:36 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > A quick google for benchmarks show that a year ago, hg was a bit faster and > generated smaller repositories than bzr, but I don't think the difference is > enough to matter. Forget a year ago, because as far as bzr is co

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 12:52 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: > On Jan 4, 2008 12:21 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > > > I understand the "sumpy uses it" reason, it is definitely a factor. > > But I would rather have a more thorough study on the merits of each > > system. Fo

Re: [Numpy-discussion] unexpected behavior with allclose( scalar, empty array)

2008-01-04 Thread Andrew Straw
Thanks, I updated the page. Charles R Harris wrote: > > > On Jan 4, 2008 12:27 PM, Andrew Straw <[EMAIL PROTECTED] > > wrote: > > I have added a page to the wiki describing this issue: > > http://scipy.org/numpy_warts_and_gotchas > > I'll link it into the main

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 4:51 AM, Russell E. Owen <[EMAIL PROTECTED]> wrote: > In article > > I am a bit puzzled by the vitriol about merging with svn. svn's built in > merge is a joke but svnmerge.py works reasonably well (especially newer > versions of svnmerge.py; I use rev 26317 and the version included

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Robert Kern
Travis E. Oliphant wrote: > I like the depth option, and that could be used with the current > interface without too much difficulty, I think. > > This question does come up quite often and should probably be addressed. Alternatively, a shape= argument could be used. You can use -1 entries if y

Re: [Numpy-discussion] PyArray_FromAny does not accept a generator?

2008-01-04 Thread Robert Kern
Neal Becker wrote: > It seems that PyArray_FromAny does not accept a generator? > > Seems like this would be useful. It's difficult to do all the magical interpretation that PyArray_FromAny() does with a iterator of unknown length. In Python, we have fromiter() which will consume an iterator to m

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 12:52 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: > On Jan 4, 2008 12:21 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > > > I understand the "sumpy uses it" reason, it is definitely a factor. > > But I would rather have a more thorough study on the merits of each > > system. Fo

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Ivan Vilata i Balaguer
David Cournapeau (el 2008-01-04 a les 20:24:04 +0900) va dir:: >[...] > Integration with trac is the real problem, I think. According to one bzr > developer, trac model (0.10, the last released one) is really based > around subversion notion of repository, which does not fit well with > mercuri

Re: [Numpy-discussion] MaskedArray and the min, max, sum, prod Methods

2008-01-04 Thread Pierre GM
On Friday 04 January 2008 12:01:14 Alexander Michael wrote: > Concretely, this is how I would write my own prod function: > > def ma_prod(a): > p = 1.0 > for x in a.data[~a.mask]: > p *= x > return p Which would work only in 1D, as you mentioned. > All the CS mumbo-jumbo aside

Re: [Numpy-discussion] unexpected behavior with allclose( scalar, empty array)

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 12:27 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: > I have added a page to the wiki describing this issue: > > http://scipy.org/numpy_warts_and_gotchas > > I'll link it into the main documentation pages over the next few days, > but I ask for a review the following text for correctn

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Fernando Perez
On Jan 4, 2008 12:21 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > I understand the "sumpy uses it" reason, it is definitely a factor. > But I would rather have a more thorough study on the merits of each > system. For example, being a user of bzr for a year and a half now, I > think I have a

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "David Cournapeau" <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 1:30 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > I like Mercurial and use it a lot, but I'm not convinced we have enough > > developers and code to justify the pain of changing the VCS a

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 12:21 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 3:58 AM, Fernando Perez <[EMAIL PROTECTED]> wrote: > > On Jan 4, 2008 11:45 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > > > > > David is 100% right, I fully support this. I would be just repeating > > > what h

Re: [Numpy-discussion] unexpected behavior with allclose( scalar, empty array)

2008-01-04 Thread Andrew Straw
I have added a page to the wiki describing this issue: http://scipy.org/numpy_warts_and_gotchas I'll link it into the main documentation pages over the next few days, but I ask for a review the following text for correctness and clarity: (You can simply edit the wiki page or post your reply here

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
Just ignore this solution. It was not quite working and I was able to get a segfault from it. Pearu On Fri, January 4, 2008 8:58 pm, Pearu Peterson wrote: > On Fri, January 4, 2008 8:00 pm, Pearu Peterson wrote: >> On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: >>> Pearu Peterson wro

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Travis E. Oliphant
Charles R Harris wrote: > > > On Jan 4, 2008 11:13 AM, Pearu Peterson <[EMAIL PROTECTED] > > wrote: > > On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: > > > So, create an empty object array and insert the entries the way > you want > > them: >

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 3:58 AM, Fernando Perez <[EMAIL PROTECTED]> wrote: > On Jan 4, 2008 11:45 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > > > David is 100% right, I fully support this. I would be just repeating > > what he says. > > > > Charles actually said another point in favor of Mercurial - it w

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 3:56 AM, Jarrod Millman <[EMAIL PROTECTED]> wrote: > In general I think that this is a good direction to go in. My general > preference would be to use git or mercurial. > > I haven't had time to read the entire thread, but since I won't get a > chance to catch up on this thread unt

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
On Fri, Jan 04, 2008 at 07:45:06PM +0100, Ondrej Certik wrote: > Charles actually said another point in favor of Mercurial - it works > on Windows (at least people say so), while git not that much (at least > people say so). I never use Windows myself, so I don't know. Note that bzr also runs unde

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 8:00 pm, Pearu Peterson wrote: > On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: >> Pearu Peterson wrote: >>> Hi, >>> >>> Say, one defines >>> >>> class A(tuple): >>> def __repr__(self): >>> return 'A(%s)' % (tuple.__repr__(self)) >>> >>> and I'd like to cre

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 8:00 pm, Pearu Peterson wrote: > On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: >> Pearu Peterson wrote: >>> Hi, >>> >>> Say, one defines >>> >>> class A(tuple): >>> def __repr__(self): >>> return 'A(%s)' % (tuple.__repr__(self)) >>> >>> and I'd like to cre

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Fernando Perez
On Jan 4, 2008 11:45 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > David is 100% right, I fully support this. I would be just repeating > what he says. > > Charles actually said another point in favor of Mercurial - it works > on Windows (at least people say so), while git not that much (at least

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Jarrod Millman
In general I think that this is a good direction to go in. My general preference would be to use git or mercurial. I haven't had time to read the entire thread, but since I won't get a chance to catch up on this thread until much later today -- here are my concerns: 1. We use as vanilla a versio

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Ondrej Certik
On Jan 4, 2008 5:56 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 1:30 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > I like Mercurial and use it a lot, but I'm not convinced we have enough > > developers and code to justify the pain of changing the VCS at this time. >

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 11:13 AM, Pearu Peterson <[EMAIL PROTECTED]> wrote: > On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: > > > So, create an empty object array and insert the entries the way you want > > them: > > > > a = np.empty(1,dtype=object) > > a[0] = A((1,2)) > > Actually this is sti

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: > So, create an empty object array and insert the entries the way you want > them: > > a = np.empty(1,dtype=object) > a[0] = A((1,2)) Actually this is still an option if to put the above to a A.as_array method something like class A(tupl

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: > Pearu Peterson wrote: >> Hi, >> >> Say, one defines >> >> class A(tuple): >> def __repr__(self): >> return 'A(%s)' % (tuple.__repr__(self)) >> >> and I'd like to create an array of A instances. > > The array function was designed a

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Travis E. Oliphant
Pearu Peterson wrote: > Hi, > > Say, one defines > > class A(tuple): > def __repr__(self): > return 'A(%s)' % (tuple.__repr__(self)) > > and I'd like to create an array of A instances. > > Currently I get > > The array function was designed a long time ago to inspect sequences and flatte

[Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
Hi, Say, one defines class A(tuple): def __repr__(self): return 'A(%s)' % (tuple.__repr__(self)) and I'd like to create an array of A instances. Currently I get >>> array([A((1,2))], dtype=object) array([[1, 2]], dtype=object) but what I'd like to get is array([A((1, 2))], dtype=object

Re: [Numpy-discussion] MaskedArray and the min, max, sum, prod Methods

2008-01-04 Thread Alexander Michael
On Jan 4, 2008 10:42 AM, Pierre GM <[EMAIL PROTECTED]> wrote: > On Friday 04 January 2008 10:27:32 Alexander Michael wrote: > > > Hmm. I liked the base ndarray behavior as it makes a lot of sense to > > me and provides an easy default that avoids needing to check the > > result between steps. > > I

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 1:30 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > I like Mercurial and use it a lot, but I'm not convinced we have enough > developers and code to justify the pain of changing the VCS at this time. I don't understand the number of developers argument: on most of the projects

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Charles R Harris
On Jan 4, 2008 4:24 AM, David Cournapeau <[EMAIL PROTECTED]> wrote: > Hi, > >First things first, happy new year to all ! > >Having recently felt the pain to use subversion merge, I was > wondering about people's feeling on moving away from subversion and > using a better system, ala mercur

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
Hi David On Fri, Jan 04, 2008 at 08:24:04PM +0900, David Cournapeau wrote: > Having recently felt the pain to use subversion merge, I was [...] Also take a look at https://launchpad.net/pqm I don't know why we haven't set up a hook like this a long time ago in SVN, it just makes so much

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Matthieu Brucher
> > As a linux user, I don't see the point of a GUI for most tasks related > to bzr :) I sometimes use bzr-gtk, though. On windows, it seems that > qbzr is the most windows-friendly. I don't know the state of > TortoiseBzr, but I will find out soon, since I have to set up a system > to coordinate c

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 5, 2008 12:22 AM, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > Hi David > > On Fri, Jan 04, 2008 at 08:24:04PM +0900, David Cournapeau wrote: > > First things first, happy new year to all ! > > Happy new year! It's been great so far :) > > > Having recently felt the pain to use

Re: [Numpy-discussion] MaskedArray and the min, max, sum, prod Methods

2008-01-04 Thread Pierre GM
On Friday 04 January 2008 10:27:32 Alexander Michael wrote: > Hmm. I liked the base ndarray behavior as it makes a lot of sense to > me and provides an easy default that avoids needing to check the > result between steps. I must admit I have troubles conceptualizing the product of an empty array

Re: [Numpy-discussion] MaskedArray and the min, max, sum, prod Methods

2008-01-04 Thread Alexander Michael
On Jan 4, 2008 10:01 AM, Pierre GM <[EMAIL PROTECTED]> wrote: > On Thursday 03 January 2008 15:49:45 Alexander Michael wrote: > > Working with the new MaskedArray, I noticed the following differences > > > > with numpy.array behavior: > > >>> masked_array([1, 2, 3], mask=True).min() > > > > 2147483

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
On Jan 4, 2008 11:26 PM, Matthieu Brucher <[EMAIL PROTECTED]> wrote: > > > > In the mean time, do you want to tell us more about how you use bzr with > > > svn. This seems like a good transitory option. > > Once you installed bzr-svn, you can import the whole scikits trunk using > > the svn-import

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
Hi David On Fri, Jan 04, 2008 at 08:24:04PM +0900, David Cournapeau wrote: > First things first, happy new year to all ! Happy new year! It's been great so far :) > Having recently felt the pain to use subversion merge, I was > wondering about people's feeling on moving away from subve

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
Hi Matthieu On Fri, Jan 04, 2008 at 03:26:52PM +0100, Matthieu Brucher wrote: > Beside this, I'm starting to use bazaar (in fact it's the successor of arch) > for a small project of mine hosted on launchpad.net, and it works > great. As Note that bzr refers to bazaar-ng (new generation), which is

Re: [Numpy-discussion] MaskedArray and Record Arrays

2008-01-04 Thread Pierre GM
On Thursday 03 January 2008 15:41:16 Alexander Michael wrote: > I am experimenting with the new MaskedArray (from > ) as a > replacement for my own home-brewed masked data handling mechanisms. ... > Any plans to make this style of record array

Re: [Numpy-discussion] MaskedArray and the min, max, sum, prod Methods

2008-01-04 Thread Pierre GM
On Thursday 03 January 2008 15:49:45 Alexander Michael wrote: > Working with the new MaskedArray, I noticed the following differences > > with numpy.array behavior: > >>> masked_array([1, 2, 3], mask=True).min() > > 2147483647 That's a bug, the result should be maskedarray.masked. Samething for ma

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Matthieu Brucher
> > > In the mean time, do you want to tell us more about how you use bzr with > > svn. This seems like a good transitory option. > Once you installed bzr-svn, you can import the whole scikits trunk using > the svn-import command. This works OK for Linux, but for Windows, the packages needed by b

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Ondrej Certik
> Imagine the pain in the other direction, which was my experience :) I > actually did not believe at first that it was so bad, and thought I was > doing something wrong. At least, it certainly convinced me that SVN was > not easier than DVCS. It would made me sick. :) > I am not familiar with sy

[Numpy-discussion] PyArray_FromAny does not accept a generator?

2008-01-04 Thread Neal Becker
It seems that PyArray_FromAny does not accept a generator? Seems like this would be useful. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Ondrej Certik
On Jan 4, 2008 12:56 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > Neal Becker wrote: > > There is a mercurial plugin for trac. > > > as well as a bzr one. The problem is more related to performance issues > (cheap things in svn are not cheap in DVCS, and vice-versa). For > example, the trac-bz

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
Ondrej Certik wrote: > On Jan 4, 2008 12:56 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: >> Neal Becker wrote: >>> There is a mercurial plugin for trac. >>> >> as well as a bzr one. The problem is more related to performance issues >> (cheap things in svn are not cheap in DVCS, and vice-versa).

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
Gael Varoquaux wrote: > On Fri, Jan 04, 2008 at 08:54:13PM +0900, David Cournapeau wrote: >> I certainly agree that changing the VCS is a big change, and requires a >> lot of thinking, though. I am not suggesting to change for the next week. > > In the mean time, do you want to tell us more about

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Neal Becker
Gael Varoquaux wrote: > On Fri, Jan 04, 2008 at 08:54:13PM +0900, David Cournapeau wrote: >> I certainly agree that changing the VCS is a big change, and requires a >> lot of thinking, though. I am not suggesting to change for the next week. > > In the mean time, do you want to tell us more about

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Gael Varoquaux
On Fri, Jan 04, 2008 at 08:54:13PM +0900, David Cournapeau wrote: > I certainly agree that changing the VCS is a big change, and requires a > lot of thinking, though. I am not suggesting to change for the next week. In the mean time, do you want to tell us more about how you use bzr with svn. Thi

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
Neal Becker wrote: > There is a mercurial plugin for trac. > as well as a bzr one. The problem is more related to performance issues (cheap things in svn are not cheap in DVCS, and vice-versa). For example, the trac-bzr plugin is really slow for timelines (it takes almost one second on a loca

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
dmitrey wrote: > As for me, I would wait until DVCS became more popular than svn. Jump > often from one VSC to another isn't a good idea, moreover, it's not > clear for now which DVCS will suppress others and became standard (being > installed in many OS by default). I don't think one will becom

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Neal Becker
There is a mercurial plugin for trac. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Neal Becker
dmitrey wrote: > As for me, I would wait until DVCS became more popular than svn. Jump > often from one VSC to another isn't a good idea, moreover, it's not > clear for now which DVCS will suppress others and became standard (being > installed in many OS by default). > > Also, I would prefer (for

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread dmitrey
As for me, I would wait until DVCS became more popular than svn. Jump often from one VSC to another isn't a good idea, moreover, it's not clear for now which DVCS will suppress others and became standard (being installed in many OS by default). Also, I would prefer (for example my openopt) chan

[Numpy-discussion] Moving away from svn ?

2008-01-04 Thread David Cournapeau
Hi, First things first, happy new year to all ! Having recently felt the pain to use subversion merge, I was wondering about people's feeling on moving away from subversion and using a better system, ala mercurial or bzr (I will talk about bzr because that's the one I know the most, bu

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 2:16 am, Mathew Yeates wrote: > Hi > Okay, here's a weird one. In Fortran you can specify the upper/lower > bounds of an array > e.g. REAL A(3:7) > > What would be the best way to translate this to a Numpy array? I would > like to do something like > A=numpy.zeros(shape=(5,)

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Robert Kern
Mathew Yeates wrote: > Hi > Okay, here's a weird one. In Fortran you can specify the upper/lower > bounds of an array > e.g. REAL A(3:7) > > What would be the best way to translate this to a Numpy array? I would > like to do something like > A=numpy.zeros(shape=(5,)) > and have the expression A[

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Gael Varoquaux
On Thu, Jan 03, 2008 at 04:16:39PM -0800, Mathew Yeates wrote: > Hi > Okay, here's a weird one. In Fortran you can specify the upper/lower > bounds of an array > e.g. REAL A(3:7) > What would be the best way to translate this to a Numpy array? I would > like to do something like > A=numpy.zeros(

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Sebastian Haase
On Jan 4, 2008 1:16 AM, Mathew Yeates <[EMAIL PROTECTED]> wrote: > Hi > Okay, here's a weird one. In Fortran you can specify the upper/lower > bounds of an array > e.g. REAL A(3:7) > > What would be the best way to translate this to a Numpy array? I would > like to do something like > A=numpy.zeros

Re: [Numpy-discussion] Towards using scons in numpy: 1st step

2008-01-04 Thread David Cournapeau
On Dec 21, 2007 10:04 AM, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Dec 20, 2007 10:29 AM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > > How did you get around using #ifdef etc? This concerns me to just > > change it, unless I'm convinced there is no problem. > I don't get around them,

Re: [Numpy-discussion] [OT] Which version of svn does svn.scipy.org run ?

2008-01-04 Thread David Cournapeau
Jarrod Millman wrote: > On Dec 17, 2007 11:23 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > >> Is it possible to know which version of subversion is used by the >> svn.scipy.org server ? I am trying to use svnsync on it, without any >> success, and wanted to know if this was coming from