CalibrationResult._index#
- CalibrationResult._index(name)[source]#
The column index of a series label, after checking it exists.
- Parameters:
name (
str) – One ofnames.- Return type:
- Returns:
Its position.
- Raises:
SpecificationError – If the label is unknown.
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> paths, outcomes = rng.standard_normal((40, 200, 2)), rng.standard_normal((40, 2)) >>> record = Calibration(paths, outcomes) >>> record.compute()._index("y2") 1 >>> record.compute()._index("z") Traceback (most recent call last): ... cultivars.exceptions.SpecificationError: unknown series 'z'; the panel has ('y1', 'y2').