[pypy-commit] pypy numpy-exp: name the abs ufunc correctly (its name is absolute)
alex_gaynor
noreply at buildbot.pypy.org
Sun May 15 04:27:50 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-exp
Changeset: r44175:310f632b2668
Date: 2011-05-14 21:36 -0500
http://bitbucket.org/pypy/pypy/changeset/310f632b2668/
Log: name the abs ufunc correctly (its name is absolute)
diff --git a/pypy/module/micronumpy/__init__.py b/pypy/module/micronumpy/__init__.py
--- a/pypy/module/micronumpy/__init__.py
+++ b/pypy/module/micronumpy/__init__.py
@@ -10,7 +10,7 @@
'zeros': 'interp_numarray.zeros',
# ufuncs
- 'abs': 'interp_ufuncs.npabs',
+ 'absolute': 'interp_ufuncs.absolute',
'negative': 'interp_ufuncs.negative',
}
diff --git a/pypy/module/micronumpy/interp_ufuncs.py b/pypy/module/micronumpy/interp_ufuncs.py
--- a/pypy/module/micronumpy/interp_ufuncs.py
+++ b/pypy/module/micronumpy/interp_ufuncs.py
@@ -16,5 +16,5 @@
return -value
@ufunc
-def npabs(value):
+def absolute(value):
return abs(value)
\ No newline at end of file
diff --git a/pypy/module/micronumpy/test/test_ufuncs.py b/pypy/module/micronumpy/test/test_ufuncs.py
--- a/pypy/module/micronumpy/test/test_ufuncs.py
+++ b/pypy/module/micronumpy/test/test_ufuncs.py
@@ -16,9 +16,9 @@
assert b[0] == 5.0
def test_abs(self):
- from numpy import array, abs as npabs
+ from numpy import array, absolute
a = array([-5.0, -0.0, 1.0])
- b = npabs(a)
+ b = absolute(a)
for i in range(3):
assert b[i] == abs(a[i])
\ No newline at end of file
More information about the pypy-commit
mailing list