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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
a6f727db
Commit
a6f727db
authored
Jan 15, 2019
by
Philipp Arras
Browse files
fixup! fixup! Add ValueInserter
parent
cdb98660
Changes
1
Show whitespace changes
Inline
Side-by-side
test/test_operators/test_adjoint.py
View file @
a6f727db
...
@@ -270,6 +270,11 @@ def testOuter(fdomain, domain):
...
@@ -270,6 +270,11 @@ def testOuter(fdomain, domain):
@
pmp
(
'seed'
,
[
12
,
3
])
@
pmp
(
'seed'
,
[
12
,
3
])
def
testValueInserter
(
sp
,
seed
):
def
testValueInserter
(
sp
,
seed
):
np
.
random
.
seed
(
seed
)
np
.
random
.
seed
(
seed
)
ind
=
tuple
([
np
.
random
.
randint
(
0
,
ss
-
1
)
for
ss
in
sp
.
shape
])
ind
=
[]
for
ss
in
sp
.
shape
:
if
ss
==
1
:
ind
.
append
(
0
)
else
:
ind
.
append
(
np
.
random
.
randint
(
0
,
ss
-
1
))
op
=
ift
.
ValueInserter
(
sp
,
ind
)
op
=
ift
.
ValueInserter
(
sp
,
ind
)
ift
.
extra
.
consistency_check
(
op
)
ift
.
extra
.
consistency_check
(
op
)
Write
Preview
Markdown
is supported
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