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/4315ea09-c381-4cf3-a3a1-d85655af0cb7%40googlegroups.com.

Reply via email to