Hi everyone. The following code raises a KeyError on the last line (say, in SageMathCell <https://sagecell.sagemath.org/>): X = SimplicialComplex ([[0], [1]]) print (X.faces (SimplicialComplex ())) X.add_face ([0, 1])
{0: set([(0,), (1,)]), -1: set([])} ---------------------------------------------------------------------------KeyError Traceback (most recent call last)<ipython-input-1-aeef18038aa4> in <module>() 1 X = SimplicialComplex ([[Integer(0)], [Integer(1)]]) 2 print (X.faces (SimplicialComplex ()))----> 3 X.add_face ([Integer(0), Integer(1)]) /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/homology/simplicial_complex.pyc in add_face(self, face) 2552 new_faces = all_new_faces[dim] 2553 else:-> 2554 new_faces = all_new_faces[dim].difference(L.faces()[dim]) 2555 L_complex[dim] = L_complex[dim].union(new_faces) 2556 else: KeyError: 0 If one removes "SimplicialComplex ()" from the middle line, everything works neatly. Well, that's it. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.