#18346: Easier handling of vertex labels in graph backends
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_work
Type: | Milestone: sage-6.7
enhancement | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers: Vincent Delecroix
theory | Work issues:
Keywords: | Commit:
Authors: | e8df618e3a7fa04547c1cc1f4195eb837f679bdf
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
public/18346 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by vdelecroix):
Replying to [comment:14 ncohen]:
> If this kind of cast from !Python/!Sage integer is really costly,
perhaps we should have a cdef function that does it somewhere? Do I make a
mistake if I say that you wrote this code in order to avoid having to
raise an exception in many cases ?
The proper solution to "convert" a Python object `u` into a long is
{{{
cdef long u_long = PyNumber_Index(u)
}}}
see
https://groups.google.com/forum/#!topic/sage-support/0ATjCgQlq4c
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/18346#comment:27>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.