check for empty inputs; closes #448

This commit is contained in:
Thomas Breloff 2016-08-16 09:47:14 -04:00
parent f560884436
commit 74ec733444

View File

@ -125,22 +125,20 @@ immutable SliceIt end
mx = length(xs) mx = length(xs)
my = length(ys) my = length(ys)
mz = length(zs) mz = length(zs)
# ret = Any[] if mx > 0 && my > 0 && mz > 0
for i in 1:max(mx, my, mz) for i in 1:max(mx, my, mz)
# add a new series # add a new series
di = copy(d) di = copy(d)
xi, yi, zi = xs[mod1(i,mx)], ys[mod1(i,my)], zs[mod1(i,mz)] xi, yi, zi = xs[mod1(i,mx)], ys[mod1(i,my)], zs[mod1(i,mz)]
# @show i, typeof((xi, yi, zi))
di[:x], di[:y], di[:z] = compute_xyz(xi, yi, zi) di[:x], di[:y], di[:z] = compute_xyz(xi, yi, zi)
# @show i, typeof((di[:x], di[:y], di[:z]))
# handle fillrange # handle fillrange
fr = fillranges[mod1(i,mf)] fr = fillranges[mod1(i,mf)]
di[:fillrange] = isa(fr, Function) ? map(fr, di[:x]) : fr di[:fillrange] = isa(fr, Function) ? map(fr, di[:x]) : fr
# @show i, di[:x], di[:y], di[:z]
push!(series_list, RecipeData(di, ())) push!(series_list, RecipeData(di, ()))
end end
end
nothing # don't add a series for the main block nothing # don't add a series for the main block
end end