diff --git a/aepsych/transforms/ops/fixed.py b/aepsych/transforms/ops/fixed.py index 67d5d91bc..feb77613e 100644 --- a/aepsych/transforms/ops/fixed.py +++ b/aepsych/transforms/ops/fixed.py @@ -126,6 +126,9 @@ def get_config_options( if "values" not in options: value = config[name].get("value") + if value is None: + raise ValueError(f"Value option not found in {name} section.") + try: options["values"] = [float(value)] except ValueError: diff --git a/aepsych/utils.py b/aepsych/utils.py index c1474e711..7383a8a7a 100644 --- a/aepsych/utils.py +++ b/aepsych/utils.py @@ -84,7 +84,7 @@ def dim_grid( if i in slice_dims.keys(): mesh_vals.append(slice(slice_dims[i] - 1e-10, slice_dims[i] + 1e-10, 1)) else: - mesh_vals.append(slice(lower[i].item(), upper[i].item(), gridsize * 1j)) + mesh_vals.append(slice(lower[i].item(), upper[i].item(), gridsize * 1j)) # type: ignore return torch.Tensor(np.mgrid[mesh_vals].reshape(dim, -1).T) diff --git a/setup.py b/setup.py index ad19d9ed7..941405fde 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ "flake8", "black", "sqlalchemy-stubs", # for mypy stubs - "mypy", + "mypy==1.14.0", "parameterized", "scikit-learn", # used in unit tests ]