## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 19:07
bocklund commented #21494
• 18:53
oscarbenjamin commented #14933
• 18:50
oscarbenjamin closed #21939
• 18:50
oscarbenjamin commented #21939
• 18:42
oscarbenjamin commented #21494
• 18:39
oscargus synchronize #22135
• 18:35
oscargus synchronize #22135
• 18:24
neozhaoliang commented #14582
• 17:33
oscargus synchronize #22135
• 17:28
oscargus commented #14582
• 17:09
javitausia starred sympy/sympy
• 17:04
sympy-bot commented #22135
• 17:04
oscargus review_requested #22135
• 17:04
oscargus review_requested #22135
• 17:04
oscargus labeled #22135
• 17:04
oscargus opened #22135
• 16:41
oscargus commented on e9b3849
• 16:17
bocklund commented #21494
• 14:24
• 14:19
sylee957 commented #22132
Kalevi Suominen
@jksuom
The ideas page should be updated after some work has been done but it is often forgotten. That is voluntary work that could be done by anyone, there is no fixed timetable. If you are unsure about the status of a GSoC idea, it is probably best to ask questions here.
francesco
Hi, I'm trying to solve a nonlinear symbolic equation, but sympy-1.2 gets stuck (it has been running for half an hour now). The code is:
from sympy import
A,B,X,Y=symbols('A B X Y')
eq1=(B
X - 1/(BX))/(A + BX + 1/(BX)) + (-BY + 1/(BY))/(A + BY + 1/(BY))
eq2=(B
Y - 1/(BY))/(A + BY + 1/(BY)) + (-B/(XY) + XY/B)/(A + B/(XY) + X*Y/B)
nonlinsolve([Eq(eq1), Eq(eq2)], [X, Y])
Any idea?
Ethan Ward
@ethankward
@cescor80_twitter do you actually need a symbolic solution? nsolve seems to work very well here
Ethan Ward
@ethankward
(given specific values for A and B)
Ayushman Koul
@ayushmankoul
@jksuom Sure sir and Thank You for responding to my question.I was working on this sympy/sympy#15117 and struck into assertion error while enclosing every base in {} as asked by mentor.Can anyone please help me in figuring out this ?
Kalevi Suominen
@jksuom
I think that an extra pair of braces will do no harm in LaTeX. You could edit the asserted lines to conform to the new output (by adding { and } in suitable places).
Ayushman Koul
@ayushmankoul
I will give it another try if I face any issue will let you know.Thank You sir @jksuom
Got a strange error in this build. In Python 2.7 and 3.6 insympy/printing/tests/test_theanocode.py[27] the error is
"""
/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/theano/gof/opt.py:251: UserWarning: WARNING: Supervisor is not added. Please build a FunctionGraphvia theano.compile.function_module.std_graph()or add the Supervisor class manually.
sub_prof = optimizer.optimize(fgraph)
"""
Is this just a Travis thing?
Bjorn
@bjodah
I think the warning is real and it indicates that the Theano-code generated by SymPy is not optimal (or even correct?). Maybe worth making an issue for it (then again, Theano is no longer actively developed).
I'll open an issue then
Aaron Meurer
@asmeurer
Sudarshan Kamath
@sudz123
Hi, I wanted to know is it necessary to run the entire ./bin/test everytime one makes a change to a particular module? I had made a few changes to test_ode.py in solvers and when I ran the test only on test_ode.py I got no error, however the complete test fails.
Kalevi Suominen
@jksuom
A change in a single module may affect tests in another module. It may sometimes be hard to discover those errors.
Sudarshan Kamath
@sudz123
All right, I'll keep that in mind, thanks
Ayushman Koul
@ayushmankoul

Hello @asmeurer @jksuom Sir I tried to debug the def _print_Symbol(self, expr): and def _deal_with_super_sub(self, string): methods in printing/latex.py file which could be the possible reasons of not enclosing symbol_latex variable in {} which is causing the assertion error as I indicated in my sympy/sympy#15117 unfortnately I am not able to fix this error.Apart from it I tried to alter the value of variable Psi_symbol to match the symbol_latex with indexed_latex but failed to do so.The following code is raising the assertion error

   def test_latex_indexed():
Psi_symbol = Symbol('Psi_0', complex=True, real=False)
Psi_indexed = IndexedBase(Symbol('Psi', complex=True, real=False))
symbol_latex = latex(Psi_symbol * conjugate(Psi_symbol))
indexed_latex = latex(Psi_indexed[0] * conjugate(Psi_indexed[0]))

Kalevi Suominen
@jksuom
I would replace the single assert symbol_latex.split() == ... with two separate lines assert symbol_latex == ... and assert indexed_latex == ... where the right hand sides are the results of the twolatexcalls.
Ayushman Koul
@ayushmankoul
Thank You @jksuom for helping me in solving this error.It has successfully passed all the test cases.Should I submit a new PR for it now or do I need to write new test for it ?
Kalevi Suominen
@jksuom
There is no need for a new PR. Only edit the code and the test.
Ayushman Koul
@ayushmankoul
I have created a new sympy/sympy#15151 for this issue and have altered the code to include very base in {}.Thank You @jksuom and @asmeurer for helping me in this.
Sudarshan Kamath
@sudz123
Hi, I have been continuously trying the ./bin/test and everytime it fails in the test_compilation.py and test_pickling.py. Also after the tests a new file is created called wrapper_module_20.pyx. I am running sympy on a MAC OS X with Python 3.6.3. My local repo is in sync with the upstream master. Should I file an Issure regarding this or can someone please help me out here? I can provide more details regarding the error if necessary.
Ayushman Koul
@ayushmankoul
Hello @sudz123 even I encountered this issue that a new file is created called wrapper_module_20.py while trying .bin/test to test modules.I am running sympy on Windows 10 and python 2.7.15.I would suggest lets wait for the response from @jksuom @asmeurer
Sudarshan Kamath
@sudz123
Oh, I thought this was just an error in my system. Sure, thanks @ayushmankoul
Robert Dougherty-Bliss
@rwbogl
Does anyone know if sympy's @cacheit decorator can be meaningfully used for an iterative function? Specifically I'm trying to avoid rolling my own cache for a recursive sequence class.
Kalevi Suominen
@jksuom
@cacheit is used for recursive functions like Basic._subs.
@sudz123 @rwbogl It seems that the errors are related to cython. They do not appear if cython has not been installed.
Sudarshan Kamath
@sudz123
@jksuom Is it safe to unistall cython? Does sympy require cython in anyway? I guess cython comes bundled in with Anaconda so it was pre-installed in my system.
Kalevi Suominen
@jksuom
SymPy does not use cython. (I have not installed it.)
Robert Dougherty-Bliss
@rwbogl
@jksuom It looks like Basic._subs calls itself. I want to use @cacheit for something that computes previous values of the function without calling itself. Am I misunderstanding the use there?
Kalevi Suominen
@jksuom
I wanted to point out that the decorator seems to work also with recursive functions. I'm not sure what you mean by an iterative function but I see no reason why it would not work with such.
Robert Dougherty-Bliss
@rwbogl
By iterative I mean that the function does not call itself in the body, and computes previous values in a loop. An example is this method to compute the Fibonacci numbers. For this example, computing the 1001th Fibonacci number computes the first 1000 terms. I'm worried that the @cacheit decorator would not save those terms.
Kalevi Suominen
@jksuom
I think that it saves the return value.
If intermediate values are to be cached, the function should call itself recursively.
Robert Dougherty-Bliss
@rwbogl
I figured that would be the prescription. Is that preferred over writing it non-recursively and implementing a local cache?
S.Y. Lee
@sylee957
Sudarshan Kamath
@sudz123
Hi @jksuom , I uninstalled cython and ran the tests. test_compilation.py test passes now but test_pickling.py still fails. Plus now two files are getting created wrapper_module_20.pyx and wrapper_module_8.pyx. It would be great if you can help me with this.
S.Y. Lee
@sylee957
@sudz123 I think that your issue can be related to #15116 if your log yields similar result
Sidhant Nagpal
@sidhantnagpal
@rwbogl It might be worthwhile to consider @recurrence_memo. See usage for Tribonacci numbers.
retsyo
@retsyo
hello. I want to know, do I use lambdify right? Thanks
curveR_center = Matrix([0.25 * u, 0.25 * sp.cos(u), 0])
lenCurve = integrate(diff(curveR_center, u, 1).norm(), (u, a, b))
lambdaLen = sp.lambdify((a, b), lenCurve, ['numpy'])

print(lambdaLen(0, 1))

print(lambdaLen(0, np.arange(0, 1, 0.1)))
Sudarshan Kamath
@sudz123
@sylee957 Yup its the same issue, I guess. So if I am making edits to some other code and the test fails just for test_pickling.py can I submit a PR, ignoring the message? Or should I wait for the issue to be fixed?
Kalevi Suominen
@jksuom
@sudz123 Does the pickling test fail in your system even without your edits? Can you show the error message.
Sudarshan Kamath
@sudz123
@jksuom Yes, Currently I have made no edits. This is the message :
sympy/utilities/tests/test_pickling.py:test_core_undefinedfunctions _______________________________________________________
Traceback (most recent call last):
File "/Users/sudarshan/Desktop/PROJECTS/GSOC/sympy/sympy/utilities/tests/test_pickling.py", line 154, in test_core_undefinedfunctions
check(f, exclude=exclude)
File "/Users/sudarshan/Desktop/PROJECTS/GSOC/sympy/sympy/utilities/tests/test_pickling.py", line 77, in check
c(a, b, d1)
File "/Users/sudarshan/Desktop/PROJECTS/GSOC/sympy/sympy/utilities/tests/test_pickling.py", line 76, in c
assert getattr(b, i) == attr, "%s != %s, protocol: %s" % (getattr(b, i), attr, protocol)
AssertionError: {'__doc__': None, '_extra_kwargs': {}, '__module__': None, '_explicit_class_assumptions': {}, 'default_assumptions': {}, '_prop_handler': {'negative': <function _eval_is_negative at 0x152f04b598>, 'commutative': <function _eval_is_commutative at 0x152ef318c8>, 'complex': <function _eval_is_complex at 0x152ef47ea0>, 'positive': <function _eval_is_positive at 0x152ef47d90>}, '_nargs': None} != {'_extra_kwargs': {}, '__module__': None, '__doc__': None, '_explicit_class_assumptions': {}, 'default_assumptions': {}, '_prop_handler': {'negative': <function Expr._eval_is_negative at 0x10d943a60>, 'commutative': <function Function._eval_is_commutative at 0x10daf6620>, 'complex': <function Function._eval_is_complex at 0x10daf66a8>, 'positive': <function Expr._eval_is_positive at 0x10d9439d8>}, '_nargs': None}, protocol: <module 'cloudpickle' from '/anaconda3/lib/python3.6/site-packages/cloudpickle/__init__.py'>

========================== tests finished: 7712 passed, 1 failed, 207 skipped, 357 expected to fail, 23 expected to fail but passed, in 3620.80 seconds ===========================
DO *NOT* COMMIT!
S.Y. Lee
@sylee957
@sudz123
I think your log is identical to mine. Then you can be safe to proceed to PR because the error is confirmed to be existing in people with cloudpickle installed,
and Travis build would not likely to fail because the feature is not tested in Travis, as other people are getting their builds successful.
Sudarshan Kamath
@sudz123
@sylee957 Sounds good. Thanks, I'll proceed with my edits.
Ayushman Koul
@ayushmankoul
Hello @jksuom @asmeurer I was going through project ideas and found this idea interesting to work upon.Please let me know how much work is done on vector module and is there any incompleted work which can be taken up as project for 3 months.Thank You
Kalevi Suominen
@jksuom
@ayushmankoul I am not sure what exactly is the idea. The name hints at integration of vector-valued differential forms (in higher dimensional spaces), but I suspect that it could be something more modest like integration of vector fields over curves and surfaces in 3-space. It seems that not much of that has been implemented so far.
Kalevi Suominen
@jksuom
On the other hand, operations having to do with derivatives have mostly been implemented in vector/operations.py, so I'm not sure if the missing integration part would suffice for a GSoC project.
Ayushman Koul
@ayushmankoul
Yes you are right @jksuom most of the functions which are required in integration of vectors fields over curves and 3D surfaces like gradient , curl ,dot,cross etc already have been completed in vector/operators.py and vector/vector.py .Still I will try to explore the codebase to look for other possible work which could be implemented in this module and discuss my queries about it with you.Thank You !
Coston
@XiantongPAN
is anyone know how to plot an Ellipse(in geometry module)?