[Numpy-discussion] numarray bug !? astype with 2d array

Nadav Horesh nadavh at VisionSense.com
Thu Nov 16 16:52:29 CST 2006


givestransform ??


> I do not see any of these problems in numarray 0.8 (from CVS).
>
>   Nadav

That is good to hear !
Was this actually a known bug ?
I'm still trying to advertive the use of Numarray (instead of buying Matlab)
in our Lab. We really benefit from the support of UInt16 and single
precision floats when analysing image data. But this "implicit transpose
feature" would have made it unusable ...

Thanks for the work,
Sebastian Haase





> On Mon, 2003-10-13 at 18:11, Sebastian Haase wrote:
> > Hi all,
> > Could someone maybe confirm this or say that numarray 0.7 has fixed this
?
> > I also found more problems when type conversions are involved:  I had a
3d
> > stack of UInt16  data and wanted to compute the 2d-fft of different
> > sections -> I got identical ffts for different sections ;-(
> >
> > Please help,
> > Sebastian Haase
> >
> > ----- Original Message ----- 
> > From: "Sebastian Haase" <haase at msg.ucsf.edu>
> > To: <numpy-discussion at lists.sourceforge.net>
> > Sent: Thursday, October 09, 2003 10:25 AM
> > Subject: [Numpy-discussion] numarray bug !? astype with 2d array gives
> > transform ??
> >
> >
> > > Hi !
> > > I just discovered this: (I'm using numarray 0.6 [on windows])
> > >
> > > >>> dy = na.fromfunction(lambda y,x: y, (3,3))
> > > >>> dx = na.fromfunction(lambda y,x: x, (3,3))
> > > >>> dy
> > > array([[0, 0, 0],
> > >        [1, 1, 1],
> > >        [2, 2, 2]])
> > > >>> dx
> > > array([[0, 1, 2],
> > >        [0, 1, 2],
> > >        [0, 1, 2]])
> > > >>> dx.type()
> > > Int32
> > > >>> dx.astype(na.Int8)
> > > array([[0, 0, 0],
> > >        [1, 1, 1],
> > >        [2, 2, 2]], type=Int8)
> > > >>> dx.astype(na.Int16)
> > > array([[0, 0, 0],
> > >        [1, 1, 1],
> > >        [2, 2, 2]], type=Int16)
> > > >>> dx.astype(na.Float)
> > > array([[ 0.,  0.,  0.],
> > >        [ 1.,  1.,  1.],
> > >        [ 2.,  2.,  2.]])
> > > >>> dx.astype(na.Float32)
> > > array([[ 0.,  0.,  0.],
> > >        [ 1.,  1.,  1.],
> > >        [ 2.,  2.,  2.]], type=Float32)
> > >
> > > What does this mean ? Am I missing something ?
> > >
> > > Thanks,
> > > Sebastian Haase
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > See the people who have HELPED US provide better services:
> > > Click here: http://sourceforge.net/supporters.php
> > > _______________________________________________
> > > Numpy-discussion mailing list
> > > Numpy-discussion at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > SourceForge.net hosts over 70,000 Open Source Projects.
> > See the people who have HELPED US provide better services:
> > Click here: http://sourceforge.net/supporters.php
> > _______________________________________________
> > Numpy-discussion mailing list
> > Numpy-discussion at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>
>





More information about the Numpy-discussion mailing list