Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Bill Baxter
On 3/23/07, Eric Firing <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > On 3/22/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > >> On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: > >>> Hello, > >>> > >>> I'd like to concatenate a couple of 1D arrays to make it a 2D array,

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Eric Firing
Sebastian Haase wrote: > On 3/22/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: >> On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: >>> Hello, >>> >>> I'd like to concatenate a couple of 1D arrays to make it a 2D array, with >>> two columns >>> (one for each of the original 1D arra

[Numpy-discussion] assignment to array.dtype

2007-03-22 Thread Jan Strube
Hi list, maybe this is a really stupid idea, and I don't want to advertise this, but what actually happens when I reassign the dtype of an object? Does it return the same as array.view? say I have the following code In [64]: b Out[64]: array([[ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8],

Re: [Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread Zachary Pincus
Hello all, > By the way, ringing at sharp edges is an intrinsic feature of higher- > order spline interpolation, right? I believe this kind of interpolant > is really intended for smooth (band-limited) data. I'm not sure why > the pre-filtering makes a difference though; I don't yet understand > w

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Sebastian Haase
On 3/22/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: > > Hello, > > > > I'd like to concatenate a couple of 1D arrays to make it a 2D array, with > > two columns > > (one for each of the original 1D arrays). I thought this would

[Numpy-discussion] numpy types for xml pickling

2007-03-22 Thread Christopher Ball
Hi, Gnosis Utils (http://www.gnosis.cx/download/Gnosis_Utils.More/) contains several modules for XML processing, one of which (xml.pickle) serializes objects to and from XML and has an API compatible with Python's pickle [http://freshmeat.net/projects/gnosisxml/]. The xml.pickle module needs t

[Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread James Turner
By the way, ringing at sharp edges is an intrinsic feature of higher- order spline interpolation, right? I believe this kind of interpolant is really intended for smooth (band-limited) data. I'm not sure why the pre-filtering makes a difference though; I don't yet understand well enough what the pr

Re: [Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread Stefan van der Walt
On Thu, Mar 22, 2007 at 04:33:53PM -0700, Travis Oliphant wrote: > >I would rather opt for changing the spline fitting algorithm than for > >padding with zeros. > > > > > From what I understand, the splines used in ndimage have the implicit > mirror-symmetric boundary condition which also allow

[Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread James Turner
Hi Zachary, OK - I sent Peter the URL for your post... Cheers, James. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Stefan van der Walt
On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: > Hello, > > I'd like to concatenate a couple of 1D arrays to make it a 2D array, with two > columns > (one for each of the original 1D arrays). I thought this would work: > > > In [47]:a=arange(0,10,1) > > In [48]:a > Out[48]:array

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Bill Baxter
Try column_stack, and also try the "See also" parts of the Numpy Examples List. very handy for finding things like this. http://www.scipy.org/Numpy_Example_List --bb On 3/23/07, Brian Blais <[EMAIL PROTECTED]> wrote: > Hello, > > I'd like to concatenate a couple of 1D arrays to make it a 2D arra

[Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Brian Blais
Hello, I'd like to concatenate a couple of 1D arrays to make it a 2D array, with two columns (one for each of the original 1D arrays). I thought this would work: In [47]:a=arange(0,10,1) In [48]:a Out[48]:array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) In [49]:b=arange(-10,0,1) In [51]:b Out[51]:arra

Re: [Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread Travis Oliphant
Stefan van der Walt wrote: >On Thu, Mar 22, 2007 at 02:41:52PM -0400, Anne Archibald wrote: > > >>On 22/03/07, James Turner <[EMAIL PROTECTED]> wrote: >> >> >> >>>So, its not really a bug, its a undesired feature... >>> >>> >>It is curable, though painful - you can pad the image out, g

Re: [Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread Stefan van der Walt
On Thu, Mar 22, 2007 at 02:41:52PM -0400, Anne Archibald wrote: > On 22/03/07, James Turner <[EMAIL PROTECTED]> wrote: > > > So, its not really a bug, its a undesired feature... > > It is curable, though painful - you can pad the image out, given an > estimate of the size of the window. Yes, this

Re: [Numpy-discussion] Contiguous flags not quite right yet.

2007-03-22 Thread Travis Oliphant
Charles R Harris wrote: > All three shapes are both C_CONTIGUOUS and F_CONTIGUOUS. I think > ignoring all 1's in the shape would give the right results for > otherwise contiguous arrays because in those positions the index can > only take the value 0. > I've thought about this before too. But

[Numpy-discussion] Contiguous flags not quite right yet.

2007-03-22 Thread Charles R Harris
Example. In [18]:a = array([1,2,3]) In [19]:a.flags Out[19]: C_CONTIGUOUS : True F_CONTIGUOUS : True OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False In [20]:a.shape = (1,3) In [21]:a.flags Out[21]: C_CONTIGUOUS : True F_CONTIGUOUS : False OWNDATA : True WRITEABLE

Re: [Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread Zachary Pincus
Hi James, Would it be possible to ask Peter if he knows anything that could help us resolve scipy ticket 213 ( http://projects.scipy.org/scipy/ scipy/ticket/213 )? The basic issue is that ndimage.spline_filter seems to introduce nasty ringing artifacts, which make all of the geometric transf

Re: [Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread Anne Archibald
On 22/03/07, James Turner <[EMAIL PROTECTED]> wrote: > So, its not really a bug, its a undesired feature... It is curable, though painful - you can pad the image out, given an estimate of the size of the window. Yes, this sucks. Anne. ___ Numpy-discuss

[Numpy-discussion] nd_image.affine_transform edge effects

2007-03-22 Thread James Turner
The people at STScI put me in touch with Peter Verveer, the author of nd_image. Unfortunately Peter is currently unable to maintain the code (either in numarray or scipy), but he did send me some comments on the problem discussed in this thread. Here's what he said: James. - Hi James, Yes,