From fcc0b79de4ae35548dbc711c9273ecd875764ccd Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 14 Apr 2010 17:24:50 +0000 Subject: BUG: Use deprecated decorator in testing ufunclike.log2. --- numpy/lib/ufunclike.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/lib/ufunclike.py') diff --git a/numpy/lib/ufunclike.py b/numpy/lib/ufunclike.py index acd46010e..734fd08be 100644 --- a/numpy/lib/ufunclike.py +++ b/numpy/lib/ufunclike.py @@ -5,7 +5,6 @@ storing results in an output array. __all__ = ['fix', 'isneginf', 'isposinf'] import numpy.core.numeric as nx -import warnings def fix(x, y=None): """ @@ -174,6 +173,7 @@ def isneginf(x, y=None): nx.logical_and(nx.isinf(x), nx.signbit(x), y) return y + _log2 = nx.log(2) def log2(x, y=None): """ @@ -203,6 +203,7 @@ def log2(x, y=None): array([ NaN, 1., 2.]) """ + import warnings msg = "numpy.lib.log2 is deprecated, use np.log2 instead." warnings.warn(msg, DeprecationWarning) -- cgit v1.2.1