[Numpy-discussion] numarray: "concatenate along new axis" returns 'unexpected' type

Sebastian Haase haase at msg.ucsf.edu
Tue Feb 8 12:06:34 CST 2005


On Tuesday 08 February 2005 11:08 am, you wrote:
> On Tue, 2005-02-08 at 13:52, Sebastian Haase wrote:
> > Hi,
> > from the numarray documentation:
> > <doc>
> > concatenate(arrs, axis=0)
> > Returns a new array containing copies of the data contained in all arrays
> > # of arrs= (a0, a1, ... an). The arrays ai will be concatenated along the
> > specified axis (default=0). All arrays ai must have the same shape along
> > every axis except for the one specified in axis. To concatenate arrays
> > along a newly created axis, you can use array((a0, ..., an)), as long as
> > all arrays have the same shape.
> > </doc>
> >
> > Is it a bug that array((a0,a1)) returns different type that a0 ?
>
> Yes.  That's not the behavior I see in numarray-CVS though.  CVS looks
> OK.

Thanks for the info, but after updating from CVS I get a problem in nd_image:
Python 2.2.1 (#1, Feb  3 2005, 06:16:31)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
<snip>
  File "<snip>/numarray/nd_image/_ni_support.py", line 35, in ?
    _type_to_num = {
AttributeError: 'module' object has no attribute 'Any'

After changing:
...
import numarray.numerictypes as numarrayt
...
numarrayt.Any
I then complained about 
  File "<snip>/numarray/nd_image/_ni_support.py", line 53, in ?
    _type_to_num[numarray.UInt64] = 9
AttributeError: 'module' object has no attribute 'UInt64'


Any hint ?

Thanks,
Sebastian Haase




More information about the Numpy-discussion mailing list