#10792: Upgrade numpy to 1.5.1
-----------------------------------------+----------------------------------
Reporter: jason | Owner: tbd
Type: task | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: packages | Keywords:
Author: Jason Grout | Upstream: N/A
Reviewer: David Kirkby | Merged:
Work_issues: doctest changes for patch |
-----------------------------------------+----------------------------------
Changes (by kcrisman):
* work_issues: doctest changes for patch, verify a couple analytic cases
=> doctest changes for patch
Comment:
Hoo boy, testing it out definitely shows some serious numerical
instability even for many more plot points. Notice this is before the
numpy upgrade or the patch.
{{{
sage: m = Riemann_Map([lambda t: e^(I*t) - 0.5*e^(-I*t)], [lambda t:
I*e^(I*t) + 0.5*I*e^(-I*t)], 0, N=2000)
sage: m.riemann_map(.45)
(0.8585664030690745+7.4218379456630256e-07j)
sage: m.riemann_map(.46)
(0.88541813465210162+3.4358512148266537e-07j)
sage: m.riemann_map(.47)
(0.91294518302491301-2.6212328466317408e-06j)
sage: m.riemann_map(.48)
(0.94117262428806991-3.5456252284863065e-05j)
sage: m.riemann_map(.49)
(0.96930329181581476-0.00016029304727194931j)
sage: m.riemann_map(.491)
(0.97166253445139428-5.3770138915852049e-05j)
sage: m.riemann_map(.492)
(0.97361488824863462+0.00018530315147004251j)
sage: m.riemann_map(.493)
(0.97486154873554642+0.00065056144560648023j)
sage: m.riemann_map(.494)
(0.97491963265632509+0.0014788861938800405j)
sage: m.riemann_map(.495)
(0.97313345395283191+0.0028473636237802834j)
sage: m.riemann_map(.496)
(0.96917007545329004+0.0049319541164373499j)
sage: m.riemann_map(.497)
(0.96580931231079858+0.0077812018516007905j)
sage: m.riemann_map(.498)
(0.98261586147447211+0.011068697234118194j)
sage: m.riemann_map(.499)
(1.1489715720875546+0.013786517516344927j)
}}}
There is nothing wrong with what the values are doing, though, and that's
the important part. Taking a hint from the doc:
{{{
sage: "error =", m.inverse_riemann_map(m.riemann_map(.49)) - .49
('error =', (-0.00032080499713899036-5.4888563828232042e-05j))
sage: "error =", m.inverse_riemann_map(m.riemann_map(.495)) - .495
('error =', (-0.0040172648041303383+0.00096565040731113271j))
sage: "error =", m.inverse_riemann_map(m.riemann_map(.499)) - .499
('error =', (-0.95337317730092064-0.0038944237237982667j))
}}}
And honestly, the documentation is clear that near boundaries there are
problems.
It is clear to me that at least for simple examples this performs as
advertised, so I don't think Ethan needs to justify the error; it's just a
very unstable thing, which probably can be improved by using something
more sophisticated than trapezoid or Simpson (maybe?) - but that's not
this ticket. I love the plots; I tried to do this with Grapher when I
taught complex analysis in some random naive ways, and it never worked
very well. This is a great addition.
So, as far as I'm concerned, positive review once someone actually uploads
a patch that corrects the doctests. I recommend that the analytic
examples go on #10945, unless Ethan has the time to add them here. The
Numpy upgrade should go in sooner rather than later.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10792#comment:30>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.