summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2014-07-30 16:48:11 -0600
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-07-31 21:21:13 +0200
commitdec6658cdc10a23ad0e733fb52a814306033d88c (patch)
treedfa2a5d879f9ec10f75287a045070729cf415432 /numpy/lib/function_base.py
parent0b5a6645ee110a8d4c6b5defd8c01791ee48bda1 (diff)
downloadnumpy-dec6658cdc10a23ad0e733fb52a814306033d88c.tar.gz
MAINT: Fixes for problems in numpy/lib revealed by pyflakes.
Some of those problems look like potential coding errors. In those cases a Fixme comment was made and the offending code, usually an unused variable, was commented out.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 00bfab6ba..3d8ffc586 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1,15 +1,5 @@
from __future__ import division, absolute_import, print_function
-__docformat__ = "restructuredtext en"
-__all__ = [
- 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', 'percentile',
- 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp',
- 'extract', 'place', 'vectorize', 'asarray_chkfinite', 'average',
- 'histogram', 'histogramdd', 'bincount', 'digitize', 'cov', 'corrcoef',
- 'msort', 'median', 'sinc', 'hamming', 'hanning', 'bartlett',
- 'blackman', 'kaiser', 'trapz', 'i0', 'add_newdoc', 'add_docstring',
- 'meshgrid', 'delete', 'insert', 'append', 'interp', 'add_newdoc_ufunc']
-
import warnings
import sys
import collections
@@ -20,21 +10,21 @@ import numpy.core.numeric as _nx
from numpy.core import linspace, atleast_1d, atleast_2d
from numpy.core.numeric import (
ones, zeros, arange, concatenate, array, asarray, asanyarray, empty,
- empty_like, ndarray, around, floor, ceil, take, ScalarType, dot, where,
- intp, integer, isscalar
+ empty_like, ndarray, around, floor, ceil, take, dot, where, intp,
+ integer, isscalar
)
from numpy.core.umath import (
pi, multiply, add, arctan2, frompyfunc, cos, less_equal, sqrt, sin,
mod, exp, log10
)
from numpy.core.fromnumeric import (
- ravel, nonzero, choose, sort, partition, mean
+ ravel, nonzero, sort, partition, mean
)
from numpy.core.numerictypes import typecodes, number
from numpy.lib.twodim_base import diag
+from .utils import deprecate
from ._compiled_base import _insert, add_docstring
from ._compiled_base import digitize, bincount, interp as compiled_interp
-from .utils import deprecate
from ._compiled_base import add_newdoc_ufunc
from numpy.compat import long
@@ -43,6 +33,17 @@ if sys.version_info[0] < 3:
range = xrange
+__all__ = [
+ 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', 'percentile',
+ 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp',
+ 'extract', 'place', 'vectorize', 'asarray_chkfinite', 'average',
+ 'histogram', 'histogramdd', 'bincount', 'digitize', 'cov', 'corrcoef',
+ 'msort', 'median', 'sinc', 'hamming', 'hanning', 'bartlett',
+ 'blackman', 'kaiser', 'trapz', 'i0', 'add_newdoc', 'add_docstring',
+ 'meshgrid', 'delete', 'insert', 'append', 'interp', 'add_newdoc_ufunc'
+ ]
+
+
def iterable(y):
"""
Check whether or not an object can be iterated over.