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
62e87d98
Commit
62e87d98
authored
Aug 16, 2019
by
Martin Reinecke
Browse files
Merge branch 'NIFTy_5' into parallizing_mirrored_samples
parents
3b331b89
4f68d243
Pipeline
#53887
canceled with stages
in 3 minutes and 29 seconds
Changes
23
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_spaces/test_lm_space.py
View file @
62e87d98
...
...
@@ -66,8 +66,7 @@ def get_k_length_array_configs():
@
pmp
(
'attribute'
,
[
'lmax'
,
'mmax'
,
'size'
])
def
test_property_ret_type
(
attribute
):
l
=
ift
.
LMSpace
(
7
,
5
)
assert_
(
isinstance
(
getattr
(
l
,
attribute
),
int
))
assert_
(
isinstance
(
getattr
(
ift
.
LMSpace
(
7
,
5
),
attribute
),
int
))
@
pmp
(
'lmax, mmax, expected'
,
CONSTRUCTOR_CONFIGS
)
...
...
@@ -76,9 +75,8 @@ def test_constructor(lmax, mmax, expected):
with
assert_raises
(
expected
[
'error'
]):
ift
.
LMSpace
(
lmax
,
mmax
)
else
:
l
=
ift
.
LMSpace
(
lmax
,
mmax
)
for
key
,
value
in
expected
.
items
():
assert_equal
(
getattr
(
l
,
key
),
value
)
assert_equal
(
getattr
(
ift
.
LMSpace
(
lmax
,
mmax
)
,
key
),
value
)
def
test_dvol
():
...
...
@@ -87,5 +85,5 @@ def test_dvol():
@
pmp
(
'lmax, expected'
,
get_k_length_array_configs
())
def
test_k_length_array
(
lmax
,
expected
):
l
=
ift
.
LMSpace
(
lmax
)
assert_allclose
(
l
.
get_k_length_array
().
to_global_data
(),
expected
)
assert_allclose
(
ift
.
LMSpace
(
lmax
)
.
get_k_length_array
().
to_global_data
(),
expected
)
test/test_spaces/test_power_space.py
View file @
62e87d98
...
...
@@ -17,11 +17,12 @@
from
itertools
import
chain
,
product
import
pytest
import
nifty5
as
ift
import
numpy
as
np
import
pytest
from
numpy.testing
import
assert_
,
assert_allclose
,
assert_equal
,
assert_raises
import
nifty5
as
ift
pmp
=
pytest
.
mark
.
parametrize
HARMONIC_SPACES
=
[
...
...
test/test_sugar.py
View file @
62e87d98
...
...
@@ -16,8 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
import
numpy
as
np
import
pytest
from
numpy.testing
import
assert_allclose
,
assert_equal
,
assert_raises
from
numpy.testing
import
assert_equal
import
nifty5
as
ift
...
...
@@ -25,8 +24,8 @@ import nifty5 as ift
def
test_get_signal_variance
():
space
=
ift
.
RGSpace
(
3
)
hspace
=
space
.
get_default_codomain
()
s
pec1
=
lambda
x
:
np
.
ones_like
(
x
)
assert_equal
(
ift
.
get_signal_variance
(
spec1
,
hspace
)
,
3.
)
s
v
=
ift
.
get_signal_variance
(
lambda
x
:
np
.
ones_like
(
x
)
,
hspace
)
assert_equal
(
sv
,
3.
)
space
=
ift
.
RGSpace
(
3
,
distances
=
1.
)
hspace
=
space
.
get_default_codomain
()
...
...
Prev
1
2
Next
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