riptable.Utils.common
Logic / helper functions used throughout the riptable benchmark suite.
Classes
Functions
|
Given an integer dtype, return the range [lo, hi] of values representable |
|
Given an integer dtype, return the range [lo, hi] of valid values |
|
Generate a random array of floating-point values with the specified length and dtype. |
|
Generate a random array of integers with the specified length and dtype. |
|
Generates a list of input sizes to benchmark against. |
|
Attributes
Value used to seed random number generators so we get "random" data for |
|
|
- class riptable.Utils.common.cached_weakref_property(func)
- _NO_OBJECT
- _WEAKREF_CACHE_NAME = '_weakref_cache'
- __get__(instance, owner=None)
- __set_name__(owner, name)
- riptable.Utils.common.integer_range(dtype, include_invalid=False)
Given an integer dtype, return the range [lo, hi] of values representable by the type, optionally excluding the invalid value (if any) for the type.
- riptable.Utils.common.integer_valid_range(dtype)
Given an integer dtype, return the range [lo, hi] of valid values representable by that dtype.
- Parameters:
dtype (data-type) – An integer dtype.
- riptable.Utils.common.rand_floats(gen, low=0.0, high=1.0, size=None, dtype=np.float64, include_invalid=False)
Generate a random array of floating-point values with the specified length and dtype.
The elements of the array are drawn from the uniform distribution over the range
[low, high)
.
- riptable.Utils.common.rand_integers(gen, size=None, dtype=np.int64, include_invalid=False)
Generate a random array of integers with the specified length and dtype.
The elements of the array will span the representable range of the dtype, optionally including the ‘invalid’ value for the type. The elements of the array are drawn from the ‘discrete uniform’ distribution.
- riptable.Utils.common.trial_size(low=250, high=_INT_16_MAX, scale_factor=2)
Generates a list of input sizes to benchmark against.
- riptable.Utils.common.zeros_eager(shape, dtype)
- riptable.Utils.common._DOUBLING_TRIAL_16
- riptable.Utils.common._DOUBLING_TRIAL_32
- riptable.Utils.common._DOUBLING_TRIAL_MAX
- riptable.Utils.common._INT_16_MAX
- riptable.Utils.common._INT_32_MAX
- riptable.Utils.common._INT_MAX
- riptable.Utils.common._SEED = 1234
Value used to seed random number generators so we get “random” data for the benchmarks while also allowing the benchmarks to be repeatable.
- riptable.Utils.common._dtypes_by_group
- riptable.Utils.common.cached_property
- riptable.Utils.common.dtypes_by_group: Mapping[str, List[numpy.dtype]]
np.typecodes
but the value for each entry is a list containing the dtypes corresponding to the typecode(s) for the original entry.See also