diff --git a/swig/python/codegen/codegen.py b/swig/python/codegen/codegen.py index 136b556e2..09864c024 100644 --- a/swig/python/codegen/codegen.py +++ b/swig/python/codegen/codegen.py @@ -289,9 +289,9 @@ def dispatchType(self, tree): if not isinstance(tree.value, ast.Name) : self.RaiseError(tree, "Not a supported type") if not (tree.value.id == "numpy" or tree.value.id == "np"): - self.RaiseError(tree, "%s is not a supported type"%(tree.value.id)) + self.RaiseError(tree, "%s.%s is not a supported type"%(tree.value.id, tree.attr)) if tree.attr not in self.numpytypes: - self.RaiseError(tree, "%s is not a supported numpy type"%(tree.attr)) + self.RaiseError(tree, "%s.%s is not a supported numpy type"%(tree.value.id, tree.attr)) self.write(self.numpytypes[tree.attr]) else: self.RaiseError(tree, "Not a supported type")