Skip to content

Commit

Permalink
Adds assert
Browse files Browse the repository at this point in the history
  • Loading branch information
phschiele committed May 13, 2024
1 parent a0a5dac commit df77d2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dsp/cone_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit df77d2d

Please sign in to comment.