summaryrefslogtreecommitdiff
path: root/numpy/lib/scimath.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2008-11-11 00:00:05 +0000
committerCharles Harris <charlesr.harris@gmail.com>2008-11-11 00:00:05 +0000
commit3d3ac93dac507fd0b5dd72aae06235e61e4d12fb (patch)
tree7e52ade38c247e0e84631647d0f88e6ca1097242 /numpy/lib/scimath.py
parent32ccf77ab97a08440a6b74af6b674ffff8f1a91b (diff)
downloadnumpy-3d3ac93dac507fd0b5dd72aae06235e61e4d12fb.tar.gz
Add log2 and exp2.
Fix scimath to use log2. Complex versions of these functions need to be added. MPL also defines log2 with slightly different properties. For instance, it returns an integer value for log2(2).
Diffstat (limited to 'numpy/lib/scimath.py')
-rw-r--r--numpy/lib/scimath.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/scimath.py b/numpy/lib/scimath.py
index 0d765fa20..269d332bf 100644
--- a/numpy/lib/scimath.py
+++ b/numpy/lib/scimath.py
@@ -328,7 +328,7 @@ def log2(x):
array([ 2.+4.5324j, 3.+4.5324j, 3.+0.j ])
"""
x = _fix_real_lt_zero(x)
- return nx.log(x)/_ln2
+ return nx.log2(x)
def power(x, p):
"""Return x**p.