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
e3a348b7
Commit
e3a348b7
authored
Jul 08, 2021
by
Martin Reinecke
Browse files
Merge branch 'better_errors' into 'NIFTy_8'
Add better error message See merge request
!658
parents
0cb56087
bc2c56f0
Pipeline
#105248
passed with stages
in 16 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/sugar.py
View file @
e3a348b7
...
...
@@ -368,6 +368,8 @@ def makeField(domain, arr):
The newly created random field
"""
if
isinstance
(
domain
,
(
dict
,
MultiDomain
)):
if
not
isinstance
(
arr
,
dict
):
raise
TypeError
(
"If `domain` is an instance of `MultiDomain`, `arr` must be a dict of Numpy arrays."
)
return
MultiField
.
from_raw
(
domain
,
arr
)
return
Field
.
from_raw
(
domain
,
arr
)
...
...
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