[Numpy-discussion] Wanted: Numeric/NumPy compatible array creation expression

konrad.hinsen at laposte.net konrad.hinsen at laposte.net
Thu Nov 23 09:34:09 CST 2006


On 23.11.2006, at 16:29, Robert wrote:

>> that will *also* (not *only*) work under NumPy (where typecode()
>> became dtype.char). An obvious idea is reshaping array1 and
>> multiplying by 0., but that can become quite costly.
>
> timeit if *0 is really costly ... you'll not get it really cheaper  
> I think.

What I expect to be costly is the reshape (resize in most  
situations), not the multiplication. I didn't do any timings though...

Konrad
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen at cnrs-orleans.fr
---------------------------------------------------------------------




More information about the Numpy-discussion mailing list