try: tris = stats.rankdata(tris, 'dense').reshape(tris.shape).astype(int) - 1 before calling mesh_edges Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180305/693119e2/attachment.html