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
7aff191c
Commit
7aff191c
authored
Jan 23, 2019
by
Reimar H Leike
Browse files
now testing whether fields cna be created from all three random types
parent
6a914318
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_field.py
View file @
7aff191c
...
...
@@ -341,6 +341,11 @@ def test_funcs(num, dom, func):
res2
=
getattr
(
np
,
func
)(
num
)
assert_allclose
(
res
.
local_data
,
res2
)
@
pmp
(
'rtype'
,
[
'normal'
,
'pm1'
,
'uniform'
])
@
pmp
(
'dtype'
,
[
np
.
float64
,
np
.
complex128
])
def
test_from_random
(
rtype
,
dtype
):
sp
=
ift
.
RGSpace
(
3
)
f
=
ift
.
Field
.
from_random
(
rtype
,
sp
,
dtype
=
dtype
)
def
test_field_of_objects
():
arr
=
np
.
array
([
'x'
,
'y'
,
'z'
])
...
...
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