Commit 59216fda authored by Lukas Riedel's avatar Lukas Riedel

Merge branch '35-pfg-throws-meaningless-exception-if-csv-converter-is-run-in-3d' into 'master'

Resolve "pfg throws meaningless exception if 'csv' converter is run in 3D"

Closes #35

See merge request !25
parents b868697c 7ca6a415
......@@ -33,6 +33,8 @@ class CSVConverter(BaseConverter):
if millerSimilarity:
raise ValueError("Miller similarity not usable with CSV generator")
if self.dim != 2:
raise ValueError("CSV converter only works in 2D!")
media_array = np.flipud(np.loadtxt(csv_path, delimiter=",", dtype=int, ndmin=2))
......
......@@ -34,6 +34,9 @@ class ImageConverter(BaseConverter):
"""
if self.dim != 2:
raise ValueError("Image converter only works in 2D!")
# create parameter dict for both media
p1 = self.create_parclass(1).parameters()
p2 = self.create_parclass(2).parameters()
......
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