Thank you for your answer. Unfortunatelly the numpy.vectorize(Rce) generates the very same error (I tried to plot it). Or pehaps I misunderstood your intention?
Dne pátek 10. dubna 2020 19:40:38 UTC+2 Nils Bruin napsal(a): > > On Friday, April 10, 2020 at 1:02:12 AM UTC-7, Ne reknu wrote: >> >> Hello. >> I need a root finder of a real function which work with a initial guess. >> That can be done by scipy fsolve, but if I try to aply it on a gamma (or >> Bessel) function in Sage, I recieve following error message: >> >> NotImplementedError: The Function gamma does not support numpy arrays as >> arguments >>> >>> >> I have encoutered this before - then the solution was replacing x[i] >> by x.item(i). I am however not skilled enough to do this chenge inside >> scipy library. Any sugestions? >> >> Change the function you pass on instead, so that it does follow numpy's > broadcasting rules: opt.fsolve(numpy.vectorize(Rce),ktip) probably does > work. > While numpy's broadcasting rules are useful for numpy, they would probably > not play nice with the other uses of functions in sage, so I don't think > it's something we can accommodate by default. Users will have to rely on > numpy's convenient wrapper. > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/03ad6007-5541-4c95-bbfd-c76d6b7ddf4c%40googlegroups.com.