Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
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
Hello, My travis test for #15125 had failed because of timeout. Can anyone help me about this? @jksuom @asmeurer
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)?
Kalevi Suominen
@jksuom
Use plot_implicit. For example, plot_implicit(x**2 + 2*y**2 - 1).
Jason K. Moore
@moorepants
Can anyone point me to instructions on how to push commits to a contributor's PR? Or tell me how to do it.
Ayushman Koul
@ayushmankoul
Hello everyone. Can anyone please tell me what should be the valid latex command for print latex(2*symbol('_x') as it returns 2_x as discussed in this sympy/sympy#14718 ?
Aaron Meurer
@asmeurer
@moorepants I believe you just have to add their fork using the ssh url and then push to it like you would push to your own remote
Jason K. Moore
@moorepants
Thanks, I guess I was thinking it'd be something simple since github supports it instead of: finding their fork, adding the remote, fetching, tracking branch, push to theirs etc...lots of steps.
Aaron Meurer
@asmeurer
I guess it's relative. It's pretty simple to me. It's the exact same workflow as pushing to your own fork
I usually already have people's fork as a remote anyway when I download there code. You just have to make sure to add the ssh url so you can push to it
You can probably push to the https url too I don't know
Coston
@XiantongPAN
@jksuom thanks, but what I want is to plot a geometry entity like line, point or circle. Is there any directly way to plot them?
Kalevi Suominen
@jksuom
I'm not sure what you mean by "directly", but if e is a geometric entity defined by an equation, then I would plot it by plot_implicit(e.equation()).
Coston
@XiantongPAN
thanks a lot,
'''
plot_implicit(e.equation())
'''
works very well in Line, Circle or Ellipse. But it can not draw a Point. Is there a way to draw the Point(like in the software geogebra)
plot_implicit(e.equation())
also, Triangle has no attribute 'equation'
Kalevi Suominen
@jksuom
I don't think that the plotting of triangles and points has been implemented in SymPy. Some coding is needed for those.
Juan Luis Cano Rodríguez
@astrojuanlu
hi all! I see that SymPy participated in Google Code-In in 2011. perhaps @asmeurer was a mentor back then? how was the experience? the announcement has just been made for this year's edition https://opensource.googleblog.com/2018/08/announcing-google-code-in-2018.html
S.Y. Lee
@sylee957
I would like to test sphinx on my windows environment, but I couldn't find any guide for windows. Anyone with experience about this?
Kalevi Suominen
@jksuom
Maybe this would help with installation.
Coston
@XiantongPAN
There is 'Ellipse' in geometry module, but no 'Hyperbola'. If I'm going to make calculation with hyperbola, I should write my own code. Is this right?
Ayushman Koul
@ayushmankoul
Hello @jksuom since you have made an observation that plotting of triangles and points hasn't been implemented in SymPy yet.If you don't mind should I raise an issue about it and start writing code for it ?
Kalevi Suominen
@jksuom
I think you could do that.
Ayushman Koul
@ayushmankoul
Thank you sir @jksuom .I was going through Codebase if I am not wrong I need to write new method for triangles inside class Plot in plotting module ? Please guide me how should I proceed over it.
Kalevi Suominen
@jksuom
I would start by studying how matplotlib works and what it can do. Then I would try to create code for plotting a segment. That could be used to plot a triangle.
Ayushman Koul
@ayushmankoul
Okay I will start with maplotlib to know about its functionality.Thank You @jksuom
Aaron Meurer
@asmeurer
@Juanlu001 Google Code-In was a lot different back then. They've made a ton of changes to the program since then.
I will say when we participated it was a lot of effort on the mentors. Don't do it unless you have multiple mentors who can commit time to it during the contest period.
I think it's not as bad as 2011 because of some of the changes they've made, but as far as I can tell it's still a lot of work.
Aaron Meurer
@asmeurer
And also remember that the program is for kids (13-17 year olds).
If you do have the time to put into it I would say it's worth it, though. You can get some very smart kids out of the program.
ronanpaixao
@ronanpaixao
Hi guys! I'm having some trouble using display() in the Jupyter notebook: