On Jul 16, 3:54 pm, Ethan Van Andel <evlu...@gmail.com> wrote:
> Sorry to keep spamming sage-support.
>
> I have a class instance m with a method riemann_map so that
> m.riemann_map(z) returns a (numpy) complex value. I want to do a
> complex_plot of that function. If I try:
> complex_plot(m.riemann_map,(-2,2),(-2,2)) I get this error:
> ...
>   File "fast_eval.pyx", line 1272, in
> sage.ext.fast_eval.fast_float_constant (sage/ext/fast_eval.c:7989)
>   File "fast_eval.pyx", line 513, in
> sage.ext.fast_eval.FastDoubleFunc.__init__ (sage/ext/fast_eval.c:3451)
> TypeError: a float is required
>
> In regular sage I just plot lambda x: m.riemann_map(x). However, I
> want to move that call to cython to reduce overhead, and it seems like
> lambda doesn't work in cython.

According to
http://sage.math.washington.edu/home/mhansen/sage-epydoc/sage.misc.cython-module.html#cython_lambda
which is probably semi-official (I couldn't find it in reference
manual but it seems okay), there is a cython_lambda which should work
okay.  Someone else will certainly be able to clarify more :)

- kcrisman

>
> Is there anything I can do to get around this?
>
> Thanks, and sorry again for asking so many questions.
>
> Ethan
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to