Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Alan G Isaac
On Mon, 8 Jan 2007, Stefan van der Walt apparently wrote: > I tend to agree that the behaviour is unexpected. In some > cases, like with sort, however, I think the difference in > behaviour is useful: I'm going to speculate everyone agrees that the numpy 'sort' function is is useful. Perhap

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Stefan van der Walt
On Mon, Jan 08, 2007 at 12:24:01PM -0800, Sebastian Haase wrote: > On 1/8/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > Sebastian Haase wrote: > > > > > I would suggest treating this as a real bug! > > > Then it could be fixed immediately. > > > > Deliberate design decisions don't turn into bugs j

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Robert Kern
Sebastian Haase wrote: > On 1/8/07, Robert Kern <[EMAIL PROTECTED]> wrote: >> Sebastian Haase wrote: >> >>> I would suggest treating this as a real bug! >>> Then it could be fixed immediately. >> Deliberate design decisions don't turn into bugs just because you disagree >> with >> them. Neither do

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Sebastian Haase
On 1/8/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > > I would suggest treating this as a real bug! > > Then it could be fixed immediately. > > Deliberate design decisions don't turn into bugs just because you disagree > with > them. Neither do those where the original de

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Robert Kern
Sebastian Haase wrote: > I would suggest treating this as a real bug! > Then it could be fixed immediately. Deliberate design decisions don't turn into bugs just because you disagree with them. Neither do those where the original decider now disagrees with them. -- Robert Kern "I have come to

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Sebastian Haase
On 1/8/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > >On 1/8/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > > > > > >Hi Stéfan, > > > >Why is there a needed for this very confusing dualty !? > >I would almost like to file a bug report on this ! > > > >(It definit

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Travis Oliphant
Sebastian Haase wrote: >On 1/8/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > > >Hi Stéfan, > >Why is there a needed for this very confusing dualty !? >I would almost like to file a bug report on this ! > >(It definitily broke "backwards compatibility" for my code coming from >numarray ) >

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Sebastian Haase
On 1/8/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > On Fri, Jan 05, 2007 at 01:57:50PM -0800, Russell E Owen wrote: > > I also checked the numpy 1.0.1 help and I confess I don't understand at > > all what it claims to do if the new size is larger. It first says it > > repeats a and then it

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Stefan van der Walt
On Fri, Jan 05, 2007 at 01:57:50PM -0800, Russell E Owen wrote: > I also checked the numpy 1.0.1 help and I confess I don't understand at > all what it claims to do if the new size is larger. It first says it > repeats a and then it says it zero-fills the output. > > >>> help(numpy.resize) > Hel

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-05 Thread Sebastian Haase
On 1/5/07, Russell E Owen <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > "Sebastian Haase" <[EMAIL PROTECTED]> wrote: > > > On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > > > > >>> N.__version__ > > > '1.0.2.dev3487' > > > > > > in any case: inside the script it some

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-05 Thread Russell E Owen
In article <[EMAIL PROTECTED]>, "Sebastian Haase" <[EMAIL PROTECTED]> wrote: >...But maybe even more worry some for the converting from numarray is this: > >>> a = N.array([5]) > >>> 999 # to kill '_' - reference > 999 > >>> a.resize(2) > >>> a > [5 0] > > in numarray you would get > >>> a =

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-05 Thread Russell E Owen
In article <[EMAIL PROTECTED]>, "Sebastian Haase" <[EMAIL PROTECTED]> wrote: > On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > > >>> N.__version__ > > '1.0.2.dev3487' > > > > in any case: inside the script it somehow generated a nan --- is > > there a bug in numpy !? > > No bug her

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-04 Thread Sebastian Haase
On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > >>> N.__version__ > '1.0.2.dev3487' > > in any case: inside the script it somehow generated a nan --- is > there a bug in numpy !? No bug here ! see below ! > I remember that there was some discussion about resize !? > What should I add

[Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-04 Thread Sebastian Haase
Hi! I'm continuing my code conversion to numpy. Trying to track down a segmentation fault I found 1) ndimage crashed because I was feeding (nan,nan) as shift value . 2) but where did I get the nan from ? I just found that there is code like this: (*paraphrased*) size = N.array( [255] ) size