numpy/random NameError with python 2.7.3 numpy 1.6.1
Verfasst: Montag 14. Mai 2012, 16:21
hello,
Scientific linux 6.1 (=RHEL 6.1); python 2.7.3; numpy 1.6.1
i get following error if 'random' is imported by a python script:
/random
"__init__.py"
is this a bug in numpy/random or what can i do to fix this...
Scientific linux 6.1 (=RHEL 6.1); python 2.7.3; numpy 1.6.1
i get following error if 'random' is imported by a python script:
Code: Alles auswählen
Traceback (most recent call last):
File "/home/ws/SW_install/RSeQC/usr/local/bin/bam_stat.py", line 24, in <module>
from qcmodule import SAM
File "/home/ws/SW_install/RSeQC/usr/local/lib/python2.7/site-packages/qcmodule/SAM.py", line 14, in <module>
import random
File "/usr/local/lib/python2.7/site-packages/numpy/random/__init__.py", line 90, in <module>
ranf = random = sample = random_sample
NameError: name 'random_sample' is not defined
"__init__.py"
Code: Alles auswählen
# To get sub-modules
from info import __doc__, __all__
from mtrand import *
# Some aliases:
ranf = random = sample = random_sample
__all__.extend(['ranf','random','sample'])
def __RandomState_ctor():
"""Return a RandomState instance.
This function exists solely to assist (un)pickling.
"""
return RandomState()
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench