[SciPy-user] assign to diagonal values?
Thu Jan 31 02:35:19 CST 2008
Just curious--is it safe to use the assert statement for anything beyond
debugging in case someone actually runs with optimization?
On Jan 31, 2008 3:00 AM, Mclean Edwards <firstname.lastname@example.org> wrote:
> To make up for my earlier response, I have coded a small timer routine
> that generates a 1000x1000 uniformly random matrix with values between 0
> and 1 (using cvxopt), then tests the code suggested 10 000 times each
> with randomly generated diagonal vectors.
> I have a slow system, but the averaged results are:
> 0.8 seconds to run David's striding code (in place modification)
> 6 seconds to run Anne's code
> 18 seconds to run a for-loop
> This is an impressive speed up.
> For smaller matrices (100x100) there is still one order of magnitude
> between for-next loops and the suggested setdiag.
> Code available upon request (requires cvxopt).
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user