bottleneck.benchmark package¶
Submodules¶
bottleneck.benchmark.autotimeit module¶
- bottleneck.benchmark.autotimeit.autoscaler(timer, mintime)¶
- bottleneck.benchmark.autotimeit.autotimeit(stmt, setup='pass', repeat=3, mintime=0.2)¶
bottleneck.benchmark.bench module¶
- bottleneck.benchmark.bench.bench(shapes=[(100,), (1000, 1000), (1000, 1000), (1000, 1000), (1000, 1000)], axes=[0, 0, 0, 1, 1], nans=[False, False, True, False, True], dtype='float64', order='C', functions=None)¶
Bottleneck benchmark.
- Parameters
- shapeslist, optional
A list of tuple shapes of input arrays to use in the benchmark.
- axeslist, optional
List of axes along which to perform the calculations that are being benchmarked.
- nanslist, optional
A list of the bools (True or False), one for each tuple in the shapes list, that tells whether the input arrays should be randomly filled with one-fifth NaNs.
- dtypestr, optional
Data type string such as ‘float64’, which is the default.
- order{‘C’, ‘F’}, optional
Whether to store multidimensional data in C- or Fortran-contiguous (row- or column-wise) order in memory.
- functions{list, None}, optional
A list of strings specifying which functions to include in the benchmark. By default (None) all functions are included in the benchmark.
- Returns
- A benchmark report is printed to stdout.
bottleneck.benchmark.bench_detailed module¶
- bottleneck.benchmark.bench_detailed.bench_detailed(function='nansum', fraction_nan=0.0)¶
Benchmark a single function in detail or, optionally, all functions.
- Parameters
- functionstr, optional
Name of function, as a string, to benchmark. Default (‘nansum’) is to benchmark bn.nansum. If function is ‘all’ then detailed benchmarks are run on all bottleneck functions.
- fraction_nanfloat, optional
Fraction of array elements that should, on average, be NaN. The default (0.0) is not to set any elements to NaN.
- Returns
- A benchmark report is printed to stdout.