Commit 7ca6a415 authored by Lukas Riedel's avatar Lukas Riedel

Add explicit errors when Image or CSV converters are called in 3D

parent af162122
......@@ -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