Skip to content

Commit

Permalink
don't try and build a Graph with no connectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
jabooth committed Feb 19, 2015
1 parent 2686628 commit 0b53237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion menpo/io/input/landmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def _parse_ljson_v2(lms_dict):
connectivity = lms_dict['landmarks'].get('connectivity')

# Don't create a PointUndirectedGraph with no connectivity
if connectivity is None:
if connectivity is None or len(connectivity) == 0:
pcloud = PointCloud(points)
else:
pcloud = PointUndirectedGraph(points, np.vstack(connectivity))
Expand Down

0 comments on commit 0b53237

Please sign in to comment.