Skip to content

Commit

Permalink
Another fix for 2d vertex detect
Browse files Browse the repository at this point in the history
  • Loading branch information
OKaluza committed Mar 28, 2018
1 parent ea0683d commit d0914ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lavavu/lavavu.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def _loadVector(self, data, geomdtype, magnitude=None):
if shape[-1] != 3 and shape[0] == 3:
#Re-arrange to array of [x,y,z] triples
data = numpy.vstack((data[0],data[1],data[2])).reshape([3, -1]).transpose()
elif shape[-1] == 2 or shape[0] == 2:
elif (shape[-1] == 2 and shape[0] != 3) or (shape[0] == 2 and shape[-1] != 3):
#Interpret as 2d data... must add 3rd dimension
return self._loadVector2d(data, geomdtype, magnitude)

Expand Down

0 comments on commit d0914ed

Please sign in to comment.