| 1 | initial version |
Hello,
Just to complete Thierry, answer I guess the most sageish way would be
sage: ZZ.random_element(0,10)
3
It is as fast as numpy and has the advantage of supporting arbitrary precision number. If you want something really fast see how ZZ.random_element is implemented using cython and gmp integers.
Vincent
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.