Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. %cython
  2. from sage.libs.gmp.all cimport *
  3.  
  4. cpdef float simple(double a):
  5. cdef mpf_t x
  6. mpf_init(x)
  7. mpf_set_d(x,a)
  8. return mpf_get_f(x)
  9.  
  10.  
  11.  
  12. Error compiling Cython file:
  13. ------------------------------------------------------------
  14. ...
  15. include "cdefs.pxi"
  16. from sage.libs.gmp.all cimport *
  17.  
  18. cpdef float simple(double a):
  19. cdef mpf_t x
  20. mpf_init(x)
  21. ^
  22. ------------------------------------------------------------
  23.  
  24. _Users_pdehaye__sage_sage_notebook_sagenb_home_admin_2_code_sage237_spyx_0.pyx:10:14: Cannot convert 'mpf_t' to Python object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement