Hi,I would like to run a script using a scipy function : fsolve. Is it possible or this library is not available on qpython?
--
You received this message because you are subscribed to the Google Groups "QPython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qpython+unsubscribe@googlegroups.com.
To post to this group, send email to qpy...@googlegroups.com.
Visit this group at https://groups.google.com/group/qpython.
To view this discussion on the web visit https://groups.google.com/d/msgid/qpython/050d1fd3-a91f-4a4f-a207-ad8bbe2c9a54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from scipy.optimize import fsolve
import numpy as np
B=[0]*4
B=np.float16(B)
def func(X):
X=np.float16(X)
N=4
Bsup = 2
Binf = 0
dx=(Bsup-Binf)/(N-1)
dx=np.float16(dx)
Phi=[0]*N
for i in range (1,N-1):
Phi[i]=(X[i-1]-2*X[i]+X[i+1])/dx**2 - X[i]**2
print(X[i])
Phi[0]=X[0]-1
Phi[N-1]=X[N-1]-5
Phi=np.float16(Phi)
return Phi
[A,infodict,ier,mesg]=fsolve(func,B,xtol=1e-5,maxfev=10000,full_output=1)
print(A)
--
You received this message because you are subscribed to the Google Groups "QPython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qpython+unsubscribe@googlegroups.com.
To post to this group, send email to qpy...@googlegroups.com.
Visit this group at https://groups.google.com/group/qpython.
To view this discussion on the web visit https://groups.google.com/d/msgid/qpython/a80803fc-e4af-4ba2-af4d-0d4019dda0e0%40googlegroups.com.
Here is the code and the output on the console.
--
You received this message because you are subscribed to the Google Groups "QPython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qpython+unsubscribe@googlegroups.com.
To post to this group, send email to qpy...@googlegroups.com.
Visit this group at https://groups.google.com/group/qpython.
To view this discussion on the web visit https://groups.google.com/d/msgid/qpython/456756bc-4983-4521-80c4-69746bc2982b%40googlegroups.com.
Dear User,Please stay tuned as our Team will look into your problem and will give you a suitable answer as soon as possible.Thank you for your patienceQPYTHON TEAM
On Wed, Jun 13, 2018 at 1:04 PM, <romain.j...@gmail.com> wrote:
Here is the code and the output on the console.
--
You received this message because you are subscribed to the Google Groups "QPython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qpython+u...@googlegroups.com.
To post to this group, send email to qpy...@googlegroups.com.
Visit this group at https://groups.google.com/group/qpython.