Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
8b210cbd
Commit
8b210cbd
authored
Jan 17, 2019
by
Philipp Arras
Browse files
Add another type check
parent
4c644a96
Changes
1
Show whitespace changes
Inline
Side-by-side
nifty5/operators/value_inserter.py
View file @
8b210cbd
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment