[Numpy-discussion] first impressions with numpy

Todd Miller jmiller at stsci.edu
Fri Mar 31 13:11:06 CST 2006


Sebastian Haase wrote:
> Hi,
> I'm a long time user of numarray. Now I downloaded numpy for the first 
> time - and am quite excited to maybe soon being able to use things 
> like weave !
> Thanks for all the good work !
>
> 1)
> I was following the discussion about dtype with interest, and so it 
> was one of the first things to check...
> >>> repr(aa.dtype)
> 'dtype('<i4')'
> >>> str(aa.dtype)
> ''<i4''
> >>> aa.dtype.name
> 'int32'
>
> Would it be possible to change str(aa.dtype) to aa.dtype.name  ??
> I think it would be much more readable !
> I'm mainly thinking of (some "less involved") people that just want to 
> know that it's a '32bit integer' ; '<i4' is quite cryptic !
>
>
> 2)
> This is probably more numarray related:
> Why does numarray.asarray( numpy.array([1]) ) return a numpy array, 
> not a numarray ??? This is even true for numarray.array( 
> numpy.array([1]) ) !!
This is what I get for numarray-CVS and numpy-CVS:

 >>> a = numarray.array(numpy.array([1]))
 >>> type(a)
<class 'numarray.numarraycore.NumArray'>
 >>> a = numarray.asarray(numpy.array([1]))
 >>> type(a)
<class 'numarray.numarraycore.NumArray'>

So... I don't see a problem.  

Also:  I logged the numarray.maximum.reduce axis=-3 transpose problem on 
SF.   It should get fixed for numarray-1.5.2 but that may be a while.

Todd
>
> I'll keep exploring...
> Thanks,
> Sebastian Haase
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting 
> language
> that extends applications into web and mobile media. Attend the live 
> webcast
> and join the prime developer group breaking into this new coding 
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> 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