Cython: error adding complex[double] to double

前端 未结 1 1933
谎友^
谎友^ 2021-01-07 13:34

According to libcpp/complex.pxd adding T to complex[T] is supported:

    complex[T] operator+(complex[T]&, T&)         


        
相关标签:
1条回答
  • 2021-01-07 14:31

    I've got it working. See cython ticket https://github.com/cython/cython/issues/1643

    It is a combination of moving

    complex[T] operator+(complex[T]&, T&) 
    

    out of cppclass definition, changing it to

    complex[T] operator+[T](complex[T]&, T&)
    

    as suggested in the question and @DavidW's idea of cimport *

    0 讨论(0)
提交回复
热议问题