Changes between Version 1 and Version 5 of Ticket #9769


Ignore:
Timestamp:
04/22/14 16:47:53 (8 years ago)
Author:
rws
Comment:

Replying to burcin:

sage: x = PolynomialRing(RR, 'x').gen()
sage: sin(x)
<boom>

The problem here is really coercion, but it should be copied to another ticket (in the basic_arithmetic component):

Incidentally the same with power series is part of #16197.

The __call__() function of RR[x] doesn't conform to the generic definition. You should be able to give the parameters as a keyword argument as well. This should be made to work:

sage: R.<x> = RR[]
sage: (x^2+1)(x=5)
11

Edit: confused poly with series, sorry

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9769

    • Property Milestone changed from to sage-6.2
    • Property Summary changed from Coercon problems to symbolic ring to symbolic function do not work with numpy.int64 arguments
  • Ticket #9769 – Description

    v1 v5  
    1818....
    1919TypeError: cannot coerce arguments: no canonical coercion from <type 'numpy.int64'> to Symbolic Ring
    20 ----
    21 
    22 sage: x = PolynomialRing(QQ, 'x').gen()
    23 sage: sin(x)
    24 sin(x)
    25 sage: x = PolynomialRing(RR, 'x').gen()
    26 sage: sin(x)
    27 ---------------------------------------------------------------------------
    28 TypeError                                 Traceback (most recent call last)
    29 .....
    30 TypeError: cannot coerce arguments: __call__() takes exactly 1 positional argument (0 given)
    31 sage: x = PolynomialRing(CC, 'x').gen()
    32 sage: sin(x)
    33 sin(x)
    34 }}}