These are chat archives for symengine/symengine

9th
Jul 2016
Ralf Stephan
@rwst
Jul 09 2016 08:25
what's the simplest way at the moment in Cython to have a 1 of type RCP[Number]?
I came up with symengine.rcp_static_cast_Number_Int(symengine.integer(1)) with the first cast newly declared as RCP[const Number] rcp_static_cast_Number_Int "SymEngine::rcp_static_cast<const SymEngine::Number>"(RCP[const Integer] &b) nogil but it gives me Cannot assign type 'RCP[Number const ]' to 'RCP[Number const ] const '
Ralf Stephan
@rwst
Jul 09 2016 08:36
oh well, and if I add const to the cast argument I get Cannot assign type 'RCP[Integer const ]' to 'RCP[Integer const ] const '
OK, since I need it const, I need to create such an integerobject first, ...
Ralf Stephan
@rwst
Jul 09 2016 08:45

but

cdef RCP[const symengine.Integer] one(symengine.integer(1))

symengine_wrapper.pyx:1022:64: Expected ')', found 'INT'

and

cdef const RCP[const symengine.Integer] one = symengine.integer(1)

symengine_wrapper.pyx:1022:13: Assignment to const 'one'
Ralf Stephan
@rwst
Jul 09 2016 15:19
Resolved this, sorry for the noise.