chiark
/
gitweb
/
~ian
/
moebius3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69a84b4
)
symbolic: actually fix sinc
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Nov 2017 14:38:29 +0000
(14:38 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Nov 2017 14:38:29 +0000
(14:38 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
symbolic.py
patch
|
blob
|
history
diff --git
a/symbolic.py
b/symbolic.py
index 611bbd575fedc228c05bd14f57fe996ff025bf95..25c4a686ea3836af5d9a63a8fbf3dd21884135cc 100644
(file)
--- a/
symbolic.py
+++ b/
symbolic.py
@@
-245,7
+245,9
@@
def gen_C():
def get_python():
# https://github.com/sympy/sympy/issues/13642
# "lambdify sinc gives wrong answer!"
+ out = q_sqparm
sinc_fixed = Function('sinc_fixed')
implemented_function(sinc_fixed, lambda x: np.sinc(x/np.pi))
+ out = out..subs(sinc,sinc_fixed)
p = list(map(eval,params))
- return lambdify(p,
q_sqparm
)
+ return lambdify(p,
out
)