From df77d2db234dabbb7fc40d7e4795933f66cddc21 Mon Sep 17 00:00:00 2001 From: phschiele Date: Sun, 12 May 2024 22:16:51 -0700 Subject: [PATCH] Adds assert --- dsp/cone_transforms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dsp/cone_transforms.py b/dsp/cone_transforms.py index 17b5a62..55109e8 100644 --- a/dsp/cone_transforms.py +++ b/dsp/cone_transforms.py @@ -76,6 +76,7 @@ def scalar_multiply(self, scalar: float) -> KRepresentation: def constant_repr(cls, value: float | int) -> KRepresentation: if not isinstance(value, (float, int)): assert value.size == 1 + assert isinstance(value, np.ndarray) value = np.squeeze(value) return KRepresentation(