Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix numerical_approx with algorithm keyword #14778

Closed
kcrisman opened this issue Jun 19, 2013 · 12 comments
Closed

Fix numerical_approx with algorithm keyword #14778

kcrisman opened this issue Jun 19, 2013 · 12 comments

Comments

@kcrisman
Copy link
Member

This is not currently an issue since we haven't implemented it, but we should make it work. See #12289.

sage: erf(1).n(algorithm='foo')
0.842700792949715
sage: erf(0)
0
sage: parent(erf(0))
Integer Ring
sage: erf(0).n(algorithm='foo')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/Users/mcneil/sagedev/sage-5.1.beta0b/sage-5.1.beta0/devel/sage-hack2/sage/<ipython console> in <module>()

/Users/mcneil/sagedev/sage-5.1.beta0b/sage-5.1.beta0/local/lib/python2.7/site-packages/sage/structure/element.so in sage.structure.element.Element.numerical_approx (sage/structure/element.c:4988)()

TypeError: numerical_approx() got an unexpected keyword argument 'algorithm'

Depends on #12289

CC: @eviatarbach

Component: symbolics

Keywords: algorithm

Author: Eviatar Bach

Branch/Commit: f9d60c8

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/14778

@kcrisman kcrisman added this to the sage-5.11 milestone Jun 19, 2013
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@eviatarbach
Copy link

Dependencies: #12289

@eviatarbach
Copy link

comment:4

Attachment: trac14778.patch.gz

@kcrisman
Copy link
Member Author

comment:5

I don't see any obvious problems with this. How did you check whether you found all possible places where numerical approximation would potentially get this keyword? Otherwise it looks good and ready to test, though patchbot hasn't gotten around to it. Not sure what the story is on that.

@eviatarbach
Copy link

comment:6

I just searched the source for _numerical_approx methods, which is what gets called when the numerical_approx function is called on an object, which is what Element uses for the numerical approximation method as well.

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@rwst
Copy link

rwst commented Feb 19, 2014

Branch: u/rws/ticket/14778

@rwst
Copy link

rwst commented Feb 19, 2014

Commit: f9d60c8

@rwst
Copy link

rwst commented Feb 19, 2014

Changed keywords from none to algorithm

@rwst
Copy link

rwst commented Feb 19, 2014

comment:9

Rebased on 6.2.beta2. Everything builds and tests OK. Easy patch, positive. Hope it's OK to copy the author name from the patch.


New commits:

f9d60c8Trac #14778: Fix numerical_approx with algorithm keyword

@rwst
Copy link

rwst commented Feb 19, 2014

Author: Eviatar Bach

@rwst
Copy link

rwst commented Feb 19, 2014

Reviewer: Ralf Stephan

@eviatarbach
Copy link

comment:10

Thanks so much for reviewing!

@vbraun
Copy link
Member

vbraun commented Mar 4, 2014

Changed branch from u/rws/ticket/14778 to f9d60c8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants