Commit 47b22f68 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Single channel numpy dtypes have length 0, not 1

parent 4b73bf05
......@@ -65,13 +65,13 @@ def sampleAlongLine(data, start, end, resolution, order):
mapcoords = coords
# multi-channel data?
if len(data.dtype) == 1:
data = [data]
else:
if len(data.dtype) > 1:
channels = []
for chan in data.dtype.fields.keys():
channels.append(data[chan])
data = channels
else:
data = [data]
ys = []
for arr in data:
......
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