summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-09-16 12:51:15 +0300
committerGitHub <noreply@github.com>2019-09-16 12:51:15 +0300
commit41fe89b9c11dec15ad1d41ef29929e2e092ff355 (patch)
tree491e051b7d3be5c4a55dc3335fbc2758eeab47b4 /numpy/lib/utils.py
parent9f3d0d6effabd4a48ead90b4e572482bbe44cfee (diff)
parent0b12f51651b2930cb085430a7db2babf0c739e7e (diff)
downloadnumpy-41fe89b9c11dec15ad1d41ef29929e2e092ff355.tar.gz
Merge pull request #14521 from alexhenrie/lookfor
MAINT: Simplify lookfor function
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 8bcbd8e86..3c71d2a7c 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -788,13 +788,8 @@ def lookfor(what, module=None, import_modules=True, regenerate=False,
if kind in ('module', 'object'):
# don't show modules or objects
continue
- ok = True
doc = docstring.lower()
- for w in whats:
- if w not in doc:
- ok = False
- break
- if ok:
+ if all(w in doc for w in whats):
found.append(name)
# Relevance sort