Someone thought that for completeness they also must implement the algorithms which are known to be unstable?any one use scipy.interpolate.KroghInterpolate?
a bit quaint or maybe lost in action?
Someone thought that for completeness they also must implement the algorithms which are known to be unstable?any one use scipy.interpolate.KroghInterpolate?
a bit quaint or maybe lost in action?
It's a bit of a motley crew as far as methods are concerned. I had never heard of Krogh interpolation. It might be very good but no background seems to be available.Someone thought that for completeness they also must implement the algorithms which are known to be unstable?any one use scipy.interpolate.KroghInterpolate?
a bit quaint or maybe lost in action?
while current <= pde.T:
# Dirichlet boundary conditions
VNew[0] = U[0] = V[0] = pde.bcl(current)
VNew[sz-1] = U[sz-1] = V[sz-1] = pde.bcr(current)
# Up Sweep
for j in range(1,sz-1): #1..n-1
U[j] = ((U[j] * fac2) + fac*(U[j + 1] + U[j - 1])) * fac1
for j in range(sz-2, 0, -1):
V[j] = ((V[j] * fac2) + fac*(V[j + 1] + V[j - 1])) * fac1;
for j in range(1,sz-1):
VNew[j] = 0.5*(U[j] + V[j])
current += k
VOld = copy.deepcopy(VNew)
I'm not sure I get this one. Usual disclaimers: simple mortal here."Syntactically, lambda is a way to define a function, which may be arbitrarily complex. But due to Python syntax choice of indentation, so full lambda will need indentation, and thus cannot be a inline argument to other functions.
The other issue is that Guido doesn't like functional programing."
f = lambda x: (
x,
x*2,
x*3)
print(list(f(2)))
# [2, 4, 6]
print("One way to do", it)https://www.python.org/dev/peps/pep-0020/
"There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch."
BTW, Mr Stroustroup visited my company recently, and listed one of our AI projects among his examples of "best uses of C++"
- "C++ treats you like a consenting adult. Python treats you like a naughty child. Ada treats you like a criminal"
I "like" this inconsistency between how core Python and Numpy assign a boolean value to a list containing one element equal zero:print("One way to do", it)https://www.python.org/dev/peps/pep-0020/
"There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch."
print("Another way to do %s" % it)
print("And another way to do {}".format(it))
print("And another way to do " + it)
bool([0])
Out[94]: True
bool(np.array([0]))
Out[95]: False
by the very definition of the bool method: "objects of Classes which has __bool__() or __len()__ method which returns 0 or False" is considered falseI "like" this inconsistency between how core Python and Numpy assign a boolean value to a list containing one element equal zero:
Code: Select allbool([0]) Out[94]: True bool(np.array([0])) Out[95]: False
Congratulations!BTW, Mr Stroustroup visited my company recently, and listed one of our AI projects among his examples of "best uses of C++"
- "C++ treats you like a consenting adult. Python treats you like a naughty child. Ada treats you like a criminal"