MCPcopy Create free account
hub / github.com/numpy/numpy / check_dir

Function check_dir

numpy/tests/test_public_api.py:20–30  ·  view source on GitHub ↗

Returns a mapping of all objects with the wrong __module__ attribute.

(module, module_name=None)

Source from the content-addressed store, hash-verified

18
19
20def check_dir(module, module_name=None):
21 """Returns a mapping of all objects with the wrong __module__ attribute."""
22 if module_name is None:
23 module_name = module.__name__
24 results = {}
25 for name in dir(module):
26 item = getattr(module, name)
27 if (hasattr(item, '__module__') and hasattr(item, '__name__')
28 and item.__module__ != module_name):
29 results[name] = item.__module__ + '.' + item.__name__
30 return results
31
32
33def test_numpy_namespace():

Callers 3

test_numpy_namespaceFunction · 0.85
test_numpy_linalgFunction · 0.85
test_numpy_fftFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected