Skip to content
GitLab
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
bc908a54
Commit
bc908a54
authored
May 06, 2021
by
Gordian Edenhofer
Browse files
correlated_fields.py: Amend TypeError message
parent
3eccfc5a
Pipeline
#101013
passed with stages
in 12 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/library/correlated_fields.py
View file @
bc908a54
...
...
@@ -675,7 +675,11 @@ class CorrelatedFieldMaker:
raise
ValueError
(
"length of dofdex needs to match total_N"
)
N
=
max
(
dofdex
)
+
1
if
self
.
_total_N
>
0
else
0
if
len
(
offset_std
)
!=
2
:
raise
TypeError
te
=
(
"`offset_std` of invalid type and/or shape"
f
"; expected a 2D tuple of floats; got '
{
offset_std
!r}
'"
)
raise
TypeError
(
te
)
zm
=
LognormalTransform
(
*
offset_std
,
self
.
_prefix
+
'zeromode'
,
N
)
if
self
.
_total_N
>
0
:
zm
=
_Distributor
(
dofdex
,
zm
.
target
,
UnstructuredDomain
(
self
.
_total_N
))
@
zm
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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