Francesc Altet wrote: >>>>Timer("a=numpy.array(100,dtype=numpy.complex128)", "import >>>> >>>> >numpy").repeat(3,10000) >[0.19819307327270508, 0.14915895462036133, 0.14999985694885254] > > >>>>Timer("a=numpy.array(10000,dtype=numpy.complex128)", "import >>>> >>>> >numpy").repeat(3,10000) >[0.15171599388122559, 0.14998698234558105, 0.14901280403137207] > >that is 15 us (in my old machine) irregardingly of the size. > > Ummm.. You are not creating empty arrays here. You are creating a 0-d array with a single entry.
>[BTW, numpy.empty seems twice as slower in my machine. Why? > > >>>>Timer("a=numpy.empty(10000,dtype=numpy.complex128)", "import >>>> >>>> >numpy").repeat(3,10000) >[0.37033700942993164, 0.31780219078063965, 0.31607294082641602] >] > > Now, you are creating an empty array with 10000 elements in it. Best, -Travis ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion