Skip to content
Snippets Groups Projects
Commit 8b210cbd authored by Philipp Arras's avatar Philipp Arras
Browse files

Add another type check

parent 4c644a96
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,8 @@ class ValueInserter(LinearOperator): ...@@ -44,6 +44,8 @@ class ValueInserter(LinearOperator):
for i, n in enumerate(index) for i, n in enumerate(index)
]): ]):
raise TypeError raise TypeError
if not len(index) == len(self.target.shape):
raise ValueError
self._index = index self._index = index
self._capability = self.TIMES | self.ADJOINT_TIMES self._capability = self.TIMES | self.ADJOINT_TIMES
# Check whether index is in bounds # Check whether index is in bounds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment