On Feb 2, 2010, at 7:40 PM, John H Palmieri wrote:
On Feb 2, 7:03 pm, Dima Pasechnik <dimp...@gmail.com> wrote:
Robert,
I don't understand what you suggest.
Try the following:
replace the line 10222 of sage/graphs/generic_graph.py
with
sage: abs(M.determinant())
(the original line does not have abs()) and run
sage -t -long "devel/sage/sage/graphs/generic_graph.py"
You should see the result above.
sage: C = graphs.CubeGraph(4)
sage: G = C.automorphism_group()
sage: M = G.character_table()
sage: M.determinant()
-712483534798848
sage: parent(M.determinant())
Cyclotomic Field of order 1 and degree 1
sage: type(M.determinant())
<type
'sage
.rings.number_field.number_field_element.NumberFieldElement_absolute'>
So M.determinant() is not an integer, it's an element of the
"Cyclotomic FIeld of order 1 and degree 1".
Ah. Of course abs() doesn't makes sense on (abstract) cyclotomic
fields in general, so it casts to a complex.
Maybe you could use one
of these for your doctest:
sage: M.determinant() == 712483534798848 or M.determinant() ==
-712483534798848
True
sage: abs(M.determinant()) == 712483534798848
True
Or
sage: M.determinant() in (-712483534798848, 712483534798848)
True
sage: abs(ZZ(M.determinant())
712483534798848
Lots of options...
- Robert
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org