@@ -959,17 +959,18 @@ def add_coord(
959959 ----------
960960 name : str
961961 Name of the dimension.
962- Forbidden: {"chain", "draw"}
962+ Forbidden: {"chain", "draw", "__sample__" }
963963 values : optional, array-like
964964 Coordinate values or ``None`` (for auto-numbering).
965965 If ``None`` is passed, a ``length`` must be specified.
966966 length : optional, scalar
967967 A symbolic scalar of the dimensions length.
968968 Defaults to ``aesara.shared(len(values))``.
969969 """
970- if name in {"draw" , "chain" }:
970+ if name in {"draw" , "chain" , "__sample__" }:
971971 raise ValueError (
972- "Dimensions can not be named `draw` or `chain`, as they are reserved for the sampler's outputs."
972+ "Dimensions can not be named `draw`, `chain` or `__sample__`, "
973+ "as those are reserved for use in `InferenceData`."
973974 )
974975 if values is None and length is None :
975976 raise ValueError (
@@ -981,7 +982,7 @@ def add_coord(
981982 )
982983 if name in self .coords :
983984 if not values .equals (self .coords [name ]):
984- raise ValueError ("Duplicate and incompatiple coordinate: %s." % name )
985+ raise ValueError (f "Duplicate and incompatiple coordinate: { name } ." )
985986 else :
986987 self ._coords [name ] = values
987988 self ._dim_lengths [name ] = length or aesara .shared (len (values ))
0 commit comments