summaryrefslogtreecommitdiff
path: root/scipy/base/scimath.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-09-28 06:53:37 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-09-28 06:53:37 +0000
commitdcd3bd07a910e1bb727e048de0e7ff2443f7285f (patch)
tree989bfa0d98885a97b3c7ddd1a329a4554acce4e1 /scipy/base/scimath.py
parent2199334cfa7e3934bf81076510a84a73054ca868 (diff)
downloadnumpy-dcd3bd07a910e1bb727e048de0e7ff2443f7285f.tar.gz
Eliminated random_lite library
Diffstat (limited to 'scipy/base/scimath.py')
-rw-r--r--scipy/base/scimath.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scipy/base/scimath.py b/scipy/base/scimath.py
index 99fe112d5..18d75b2df 100644
--- a/scipy/base/scimath.py
+++ b/scipy/base/scimath.py
@@ -16,6 +16,8 @@ from type_check import isreal
__all__.extend([key for key in dir(_nx.umath) \
if key[0]!='_' and key not in __all__])
+_ln2 = log(2.0)
+
def _tocomplex(arr):
if arr.dtypechar in ['f', 'h', 'B', 'b','H']:
return arr.astype('F')
@@ -57,7 +59,7 @@ def log2(x):
""" Take log base 2 of x.
"""
x = _fix_real_lt_zero(x)
- return log(x)/log(2)
+ return log(x)/_ln2
def power(x, p):
x = _fix_real_lt_zero(x)