Elements of verts list in Triangle class has types either int or numpy.int64.
For v of type int the type of (1 << v) is automatically promoted to long for large v.
For v of type numpy.int64 (1 << v) is kept as numpy.int64, so the triangleKey gets invalid, truncated value.
Fix it by casting types of v to int, during the computation of the triangleKey.
Elements of verts list in Triangle class has types either int or numpy.int64. For v of type int the type of (1 << v) is automatically promoted to long for large v. For v of type numpy.int64 (1 << v) is kept as numpy.int64, so the triangleKey gets invalid, truncated value. Fix it by casting types of v to int, during the computation of the triangleKey.