@@ -1180,6 +1180,9 @@ def _create_dmg_RVs( # noqa: N802, C901
1180
1180
ValueError
1181
1181
Raises an error if the scaling specification is invalid or
1182
1182
if the input DataFrame does not meet the expected format.
1183
+ ValueError
1184
+ If a capacity scaling operation is associated with an
1185
+ unsupported distribution.
1183
1186
TypeError
1184
1187
If there are any issues with the types of the data in the
1185
1188
input DataFrame.
@@ -1390,18 +1393,18 @@ def map_ds(values: np.ndarray, offset: int) -> np.ndarray:
1390
1393
]
1391
1394
1392
1395
if capacity_adjustment_operation :
1393
- if family in {'normal' , 'lognormal' , 'deterministic' }:
1394
- theta [0 ] = self ._handle_operation (
1395
- theta [0 ],
1396
- capacity_adjustment_operation [0 ],
1397
- float (capacity_adjustment_operation [1 ]),
1398
- )
1399
- else :
1400
- self .log .warning (
1396
+ if family not in {'normal' , 'lognormal' , 'deterministic' }:
1397
+ msg = (
1401
1398
f'Capacity adjustment is only supported '
1402
1399
f'for `normal` or `lognormal` distributions. '
1403
1400
f'Ignoring: `{ cmp_loc_dir } `, which is `{ family } `'
1404
1401
)
1402
+ raise ValueError (msg )
1403
+ theta [0 ] = self ._handle_operation (
1404
+ theta [0 ],
1405
+ capacity_adjustment_operation [0 ],
1406
+ float (capacity_adjustment_operation [1 ]),
1407
+ )
1405
1408
1406
1409
tr_lims = [
1407
1410
frg_params_ls .get (f'Truncate{ side } ' , np .nan )
0 commit comments