Commit 879c7be9 authored by theos's avatar theos Committed by csongor
Browse files

Fixed exceptions in FFTOperator.

parent 79682608
...@@ -59,14 +59,14 @@ class FFTOperator(LinearOperator): ...@@ -59,14 +59,14 @@ class FFTOperator(LinearOperator):
forward_class = self.transformation_dictionary[ forward_class = self.transformation_dictionary[
(self.domain[0].__class__, self.target[0].__class__)] (self.domain[0].__class__, self.target[0].__class__)]
except KeyError: except KeyError:
raise TypeError( raise ValueError(
"No forward transformation for domain-target pair " "No forward transformation for domain-target pair "
"found.") "found.")
try: try:
backward_class = self.transformation_dictionary[ backward_class = self.transformation_dictionary[
(self.target[0].__class__, self.domain[0].__class__)] (self.target[0].__class__, self.domain[0].__class__)]
except KeyError: except KeyError:
raise TypeError( raise ValueError(
"No backward transformation for domain-target pair " "No backward transformation for domain-target pair "
"found.") "found.")
...@@ -156,13 +156,13 @@ class FFTOperator(LinearOperator): ...@@ -156,13 +156,13 @@ class FFTOperator(LinearOperator):
try: try:
codomain_class = cls.default_codomain_dictionary[domain_class] codomain_class = cls.default_codomain_dictionary[domain_class]
except KeyError: except KeyError:
raise TypeError("unknown domain") raise ValueError("Unknown domain")
try: try:
transform_class = cls.transformation_dictionary[(domain_class, transform_class = cls.transformation_dictionary[(domain_class,
codomain_class)] codomain_class)]
except KeyError: except KeyError:
raise TypeError( raise ValueError(
"No transformation for domain-codomain pair found.") "No transformation for domain-codomain pair found.")
return transform_class.get_codomain(domain) return transform_class.get_codomain(domain)
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