Opened 2 years ago
Closed 18 months ago
#14778 closed defect (fixed)
Fix numerical_approx with algorithm keyword
Reported by: | kcrisman | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-6.2 |
Component: | symbolics | Keywords: | algorithm |
Cc: | eviatarbach | Merged in: | |
Authors: | Eviatar Bach | Reviewers: | Ralf Stephan |
Report Upstream: | N/A | Work issues: | |
Branch: | f9d60c8 (Commits) | Commit: | f9d60c844c01d4153fe96705cdfd7a5b5dbdebbf |
Dependencies: | #12289 | Stopgaps: |
Description
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'
Attachments (1)
Change History (12)
comment:1 Changed 2 years ago by eviatarbach
- Cc eviatarbach added
comment:2 Changed 2 years ago by jdemeyer
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 2 years ago by eviatarbach
- Dependencies set to #12289
Changed 2 years ago by eviatarbach
comment:4 Changed 2 years ago by eviatarbach
- Status changed from new to needs_review
comment:5 Changed 2 years ago by kcrisman
comment:6 Changed 2 years ago by eviatarbach
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.
comment:7 Changed 19 months ago by vbraun_spam
- Milestone changed from sage-6.1 to sage-6.2
comment:8 Changed 19 months ago by rws
- Branch set to u/rws/ticket/14778
- Created changed from 06/19/13 13:58:16 to 06/19/13 13:58:16
- Modified changed from 01/30/14 13:20:52 to 01/30/14 13:20:52
comment:9 Changed 19 months ago by rws
- Commit set to f9d60c844c01d4153fe96705cdfd7a5b5dbdebbf
- Keywords algorithm added
- Reviewers set to Ralf Stephan
- Status changed from needs_review to positive_review
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:
f9d60c8 | Trac #14778: Fix numerical_approx with algorithm keyword |
comment:10 Changed 19 months ago by eviatarbach
Thanks so much for reviewing!
comment:11 Changed 18 months ago by vbraun
- Branch changed from u/rws/ticket/14778 to f9d60c844c01d4153fe96705cdfd7a5b5dbdebbf
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
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.