In[]:=
ClearAll["Global`*"]
In[]:=
FindExternalEvaluators["Python"]session=StartExternalSession["Python"]
Out[]=
Out[]=
ExternalSessionObject
ExternalEvaluate[session,"from scipy import special"](*loadpylibrary"special"*)
externalF[u_]:=ExternalEvaluate[session,"special.ellip_harm(1,2,1,2,"<>ToString[u]<>")"](*callpythonfunction,4constantsand1variable*)externalF[10](*exampleofcall*)
Out[]=
9.94987
In[]:=
NIntegrate[externalF[x],{x,0.5,1},Method{Automatic,"SymbolicProcessing"False}](*Integration*)
Out[]=
NIntegrate[externalF[x],{x,0.5,1},Method{Automatic,SymbolicProcessingFalse}]
In[]:=
DeleteObject[session]
