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: [EMAIL PROTECTED] --------------------------------------------------------------------- _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
