Commit bc2c56f0 authored by Philipp Arras's avatar Philipp Arras
Browse files

Add better error message

parent 0cb56087
Pipeline #105243 passed with stages
in 15 minutes and 44 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)
......
Markdown is supported
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