On 3 Aug 2016, at 13:00, numpy-discussion-requ...@scipy.org wrote:
> Message: 3
> Date: Tue, 2 Aug 2016 22:50:42 +0100
> From: Evgeni Burovski
> To: Discussion of Numerical Python
> Subject: Re: [Numpy-discussion] scipy curve_fit variable list of
> optimisation param
On Tue, Aug 2, 2016 at 6:41 PM, Siegfried Gonzi
wrote:
> Hi all
>
> Does anyone know how to invoke curve_fit with a variable number of
> parameters, e.g. a1 to a10 without writing it out,
>
> e.g.
>
> def func2( x, a1,a2,a3,a4 ):
>
> # Bessel function
> tmp = scipy.special.j0( x[:
Hi all
Does anyone know how to invoke curve_fit with a variable number of parameters,
e.g. a1 to a10 without writing it out,
e.g.
def func2( x, a1,a2,a3,a4 ):
# Bessel function
tmp = scipy.special.j0( x[:,:] )
return np.dot( tmp[:,:] , np.array( [a1,a2,a3,a4] )
### y