Opened 5 years ago
Closed 5 years ago
#19425 closed defect (fixed)
Order in symbolic ring: error calling operator
Reported by:  dkrenn  Owned by:  

Priority:  major  Milestone:  sage6.10 
Component:  symbolics  Keywords:  
Cc:  Merged in:  
Authors:  Benjamin Hackl  Reviewers:  Ralf Stephan 
Report Upstream:  N/A  Work issues:  
Branch:  7a2e948 (Commits)  Commit:  7a2e948bdb80c0292cf70fa2286e0c532e66cf13 
Dependencies:  Stopgaps: 
Description (last modified by )
sage: R.<r> = ZZ[[]] sage: o = SR(r.O(2)).operands()[1]; o Order(r^2) sage: o.operator() ... RuntimeError: cannot find SFunction in table
or
x.Order().operator() ... RuntimeError: cannot find SFunction in table
Change History (7)
comment:1 followup: ↓ 3 Changed 5 years ago by
comment:2 Changed 5 years ago by
 Description modified (diff)
comment:3 in reply to: ↑ 1 ; followup: ↓ 4 Changed 5 years ago by
Replying to cheuberg:
sage: (x+x^2).series(x, 2).operator() is None True
The topmost operator in symbolic series pseries
is not a registered function, but it can be seen in the expression tree:
sage: (x+x^2).series(x, 2)._dbgprinttree() pseries @0x4e2c3b0, hash=0x0, flags=0x3 1 (numeric) @0x35d70d0, hash=0x0, flags=0x7 1 (numeric) @0x35d70d0, hash=0x0, flags=0x7  function Order @0x4c197f0, serial=12, hash=0x0, flags=0x3, nops=1 1 (numeric) @0x35d70d0, hash=0x0, flags=0x7 ===== 2 (numeric) @0x35d7130, hash=0x0, flags=0x7  x (symbol) @0x3e5d6d0, serial=5, hash=0xf4f4bfee, flags=0xf, domain=0, iflags=0000000000000000 0 (numeric) @0x3647180, hash=0x0, flags=0x7
You can see that the function Order
is there too. GiNaC::Order
is registered in Pynac and imported to Sage (symbolic/ginac.pxd
). But it somehow doesn't get into Sage's registry sfunction_serial_dict
which is created and used in symbolic/function.pyx
.
comment:4 in reply to: ↑ 3 Changed 5 years ago by
 Branch set to u/behackl/function/Orderregistration
 Commit set to 7a2e948bdb80c0292cf70fa2286e0c532e66cf13
 Status changed from new to needs_review
Replying to rws:
But it somehow doesn't get into Sage's registry
sfunction_serial_dict
which is created and used insymbolic/function.pyx
.
This was because Order
was not registered. Should be fixed now.
New commits:
84aa1e2  register Orderfunction

318dd7b  add examples and tests

7a2e948  add seealsoblock

comment:5 Changed 5 years ago by
 Reviewers set to Ralf Stephan
Passes tests in selected directories. As soon as a patchbot run passes this can be set positive.
comment:6 Changed 5 years ago by
 Status changed from needs_review to positive_review
comment:7 Changed 5 years ago by
 Branch changed from u/behackl/function/Orderregistration to 7a2e948bdb80c0292cf70fa2286e0c532e66cf13
 Resolution set to fixed
 Status changed from positive_review to closed