logo       

Re: extracting a random subset of a vector: msg#00030

python.numeric.general

Subject: Re: extracting a random subset of a vector

[Replying to the list instead of just Jp. Sorry, Jp! Mail readers will be the death of me.]

Jp Calderone wrote:

Chris Barker wrote:

Curzio Basso wrote:

a question about the method: isn't a bit risky to use the clock() for timing the performance? The usual argument is that CPU allocates time for different processes, and the allocation could vary.



that's why I use time.clock() rather than time.time().


Perhaps clearing up a mutually divergent assumption: time.clock() measures CPU time on POSIX and wallclock time (with higher precision than time.time()) on Win32.

FWIW, the idiom recommended by Tim Peters is the following:

import time
import sys

if sys.platform == 'win32':
now = time.clock
else:
now = time.time

and then using now() to get the current time.

Jp

--
Robert Kern
rkern@xxxxxxxx

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise