#18529: Topological manifolds: basics
-------------------------------------+-------------------------------------
Reporter: egourgoulhon | Owner: egourgoulhon
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: geometry | Resolution:
Keywords: topological | Merged in:
manifolds | Reviewers: Travis Scrimshaw
Authors: Eric Gourgoulhon | Work issues:
Report Upstream: N/A | Commit:
Branch: | 0b08b114e03c063bd2e500ac900fd843fb12673b
public/manifolds/top_manif_basics | Stopgaps:
Dependencies: #18175 |
-------------------------------------+-------------------------------------
Comment (by tscrim):
Replying to [comment:63 egourgoulhon]:
> Have you noticed that some doctests failed in the latest commit? This
due to a typo: "coordintes" instead of "coordinates" in the replacement of
> {{{
> if self._restrictions != []:
> substitutions = dict(zip(self._xx, coordinates))
> }}}
> by
> {{{
> if self._restrictions:
> substitutions = {x: coordintes[i] for i,x in
enumerate(self._xx)}
> }}}
> in `chart.py`. By the way, why is the second form better than the first
one?
No, but I didn't run all of the doctests before I pushed (in part because
I was planning to do a lot more work).
I think the latter is more clear in terms of code. I also thought I had
run some timings before that the second was faster, but this is not the
case:
{{{
sage: k,v = range(1000), range(1000)
sage: %timeit d = dict(zip(k,v))
The slowest run took 5.50 times longer than the fastest. This could mean
that an intermediate result is being cached
10000 loops, best of 3: 58.4 µs per loop
sage: %timeit d = {x: v[i] for i,x in enumerate(k)}
}}}
So I will just revert this change (and any others like it).
--
Ticket URL: <http://trac.sagemath.org/ticket/18529#comment:64>
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.