bench(self, label='fast', verbose=1, extra_argv=None)
Benchmarks are like tests, but have names starting with "bench" instead of "test", and can be found under the "benchmarks" sub-directory of the module.
Each NumPy module exposes bench
in its namespace to run all benchmarks for it.
Identifies the benchmarks to run. This can be a string to pass to the nosetests executable with the '-A' option, or one of several special values. Special values are:
'fast' - the default - which corresponds to the nosetests -A
option of 'not slow'.
'full' - fast (as above) and slow benchmarks as in the 'no -A' option to nosetests - this is the same as ''.
None or '' - run all tests.
attribute_identifier - string passed directly to nosetests as '-A'.
Verbosity value for benchmark outputs, in the range 1-10. Default is 1.
List with any extra arguments to pass to nosetests.
Returns True if running the benchmarks works, False if an error occurred.
Run benchmarks for module using nose.
>>> success = np.lib.bench() #doctest: +SKIP Running benchmarks for numpy.lib ... using 562341 items: unique: 0.11 unique1d: 0.11 ratio: 1.0 nUnique: 56230 == 56230 ... OKThis example is valid syntax, but we were not able to check execution
>>> success #doctest: +SKIP TrueSee :
The following pages refer to to this document either explicitly or contain code examples using this.
numpy.testing._private.nosetester.NoseTester.bench
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them