Commit e3a348b7 authored by Martin Reinecke's avatar 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
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment