pyhs3.axes.ConstantAxis

class pyhs3.axes.ConstantAxis(**data)[source]

Axis for constant data.

Alias for Axis with required const field.

As a domain axis, this currently has no effect on model construction: get() returns the unbounded default for any axis that isn’t a DomainCoordinateAxis, so a parameter named by a ConstantAxis is treated as unbounded, the same as one the domain doesn’t name at all. To fix a parameter’s value, set const=True on its ParameterPoint instead.

Variables:
  • name – Name of the axis/variable

  • const – true (required)

Parameters:

data (Any)

Fields

Field

Type

Required

Default

const

Literal[True]

No

True

name

str

Yes

__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

Attributes

ConstantAxis.const
ConstantAxis.name