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
Neel Shah
NIFTy
Commits
61a550d1
Commit
61a550d1
authored
Nov 07, 2019
by
Philipp Arras
Browse files
Fixup ValueInserter
parent
c6e6487d
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_value_inserter.py
View file @
61a550d1
...
...
@@ -34,8 +34,8 @@ def test_value_inserter(sp, seed):
np
.
random
.
seed
(
seed
)
ind
=
tuple
([
np
.
random
.
randint
(
0
,
ss
-
1
)
for
ss
in
sp
.
shape
])
op
=
ift
.
ValueInserter
(
sp
,
ind
)
f
=
ift
.
from_random
(
'normal'
,
ift
.
UnstructuredDomain
((
1
,))
)
inp
=
f
.
to_global_data
()
[
0
]
f
=
ift
.
from_random
(
'normal'
,
op
.
domain
)
inp
=
f
.
to_global_data
()
ret
=
op
(
f
).
to_global_data
()
assert_
(
ret
[
ind
]
==
inp
)
assert_
(
np
.
sum
(
ret
)
==
inp
)
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