File: randomx.py

package info (click to toggle)
enthought-traits-ui 2.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 15,204 kB
  • ctags: 9,623
  • sloc: python: 45,547; sh: 32; makefile: 19
file content (16 lines) | stat: -rw-r--r-- 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
randomx imports either Numeric, numarray or numpy based
random modules. See numerix for more information on selectors.
"""
from numerix import which
if which[0]=='numpy':
    from numpy.random import *
    _numpy_random_seed = seed
    def seed(*args):
        if len(args)>1:
            return _numpy_random_seed(args)
        return _numpy_random_seed(*args)
elif which[0]=='numarray':
    from numarray.random_array import *
elif which[0]=='numeric':
    from RandomArray import *