Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 12 01:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    (compare)

  • Sep 11 12:19

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 10 03:21

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    made changes (compare)

  • Sep 08 06:28

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added tests for leading terms f… (compare)

  • Sep 08 03:43

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed the outputs being retur… (compare)

  • Sep 07 09:34

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed leading term being ret… (compare)

  • Sep 07 07:27

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Redundant block from le… (compare)

  • Sep 07 02:44

    anutosh491 on GSoC_Pr4.3_Implementing_some_series_method_for_uppergamma_lowergamma_expint_and_other_errors_functions

    Implemented some series methods… (compare)

  • Sep 06 16:44

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Order term (compare)

  • Sep 06 11:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added test cases for limits and… (compare)

  • Sep 06 10:51

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 06 10:40

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    (compare)

  • Sep 06 04:13

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    This commit does the following … Refactored mrv_leadterm in grun… Fixed errors arising for limits… and 3 more (compare)

  • Sep 06 02:08

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fix(integrals): handle degenera… functions: Generalised Dirichle… author: update Megan Ly in .mai… and 23 more (compare)

  • Sep 05 14:16

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Changed if condition for bessel… (compare)

  • Sep 05 02:49

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Improved code quality (compare)

  • Sep 03 10:24

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    changed is function to equality… (compare)

  • Sep 03 10:14

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fixed failing tests (compare)

  • Sep 01 12:23

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed code quality (compare)

  • Sep 01 12:00

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added case where number of term… (compare)

Kalevi Suominen
@jksuom
It is a standard construction in algebra. To any ring AA, one can associate the "dual ring" A[δ]A[\delta] where δ2=0\delta^2 = 0.
Micah
@micahscopes
awesome
I didn't realize that
what is that square bracket notation?
is that a "ring extension"?
Kalevi Suominen
@jksuom
Yes, extension of AA by δ\delta.
Its elements are polynomials in δ\delta with coefficients in AA. In this case, only linear polynomials.
Micah
@micahscopes
that makes sense
you can use the dual ring to do automatic differentiation
in my case, I'd like to use it to render fractals made out of clifford algebras and other interesting algebras
with automatic differentiation, you can create a "distance estimator" that can be used to render the surface of a fractal set
(theoretically)
so far I've only been able to render these fractals using a "brute force" approach, which actually goes and tests each point to see if it's in the fractal
this doesn't scale well for large dimensional algebras
Abhigyan Khaund
@abhigyank
Hey, I am trying to plot a scatter of points using the Plot module in sympy. From the documention I am unable to figure out how do I plot a scatter of points as we do in matplotlib.
I have 2 arrays; call them A and B. I can do a scatter plot using matplotlib like this:
plt.plot(A,B)
How do I do the same in Sympy?
Aaron Meurer
@asmeurer
Sympy only deals with plotting of sympy expressions. If you want to plot a dataset, you should use matplotlib, just as you have already done
Abhigyan Khaund
@abhigyank
Ok thanks!
Is there a way to plot the dataset in matplot lib and plot the sympy expression using sympy and somehow display the two plots in a single window?
Aaron Meurer
@asmeurer
I think you might be able to access the figure from the sympy plot. I'm not sure.
Another way is to lambdify the sympy expression and plot it manually with np.linspace
udit4
@udit4
Hello all, i am new to the SymPy project.. Can anyone help me where can i find complete documentation of SymPy and some other relevant sources, so that i can get some more insights about project and then start contributing to the same. Thanks in advance.
Malkhan Singh
@Malkhan52
I would recommend before start contribution go through documents and tutorials, you will definitely get idea how to start contribution
udit4
@udit4
@Malkhan52 thank you so much..
Kalevi Suominen
@jksuom
25 in sieve is a membership test operation in Python. It evaluates to False as sieve is the list of prime numbers and 25 is not a prime.
S.Y. Lee
@sylee957
Hello, I want to write a test case to check if a certain function is called.
But I the closest one I could find, is to make an arbitrary function which can raise a mock exception when called, and catching up via raises().
However, I think this method cannot be used to check whether the function can call any default APIs from sympy.
I need some help about this
Sudarshan Kamath
@sudz123

Hi while running the doc tests, there are a sequence of tests which give :

"ttk::ThemeChanged"
can't invoke "event" command: application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within

namely test_plot.py and test_plot_implicit.py . Are these necessary if the application has been destroyed? Or can they be removed?

Kalevi Suominen
@jksuom
@sylee957 What kind of test are you thinking of. Is it not possible to run the code in a debugger to see if a function is called?
S.Y. Lee
@sylee957
@jksuom
It is about testing an higher order function, that it really can call a specific method in regards to parameters or keywords passed.
There are some examples like #15207, where a higher order function can set a specific internal function to call,
and I want to figure out how to write tests for such cases, so that such functions like _iszero() or simplify() is really called once inside the routine.
Kalevi Suominen
@jksuom
I think that it would suffice to test this locally. You could temporarily add statements like print("_eval_det_bareiss: iszerofunc = ", iszerofunc.__name__) to see that everything works as expected.
S.Y. Lee
@sylee957

@jksuom
In terms of testing only while developing locally, that can be a viable option.
But for introducing any unit test to certify that it is supposed to work after any other changes in the future,
I don't think there are much viable options other than introducing some backdoors for debug mode or such.

However, I had found an interesting example called Mock

import mock # conda install mock

from sympy import *
from sympy.matrices.matrices import _iszero as _iszero_copy
from sympy.matrices.matrices import _is_zero_after_expand_mul as _is_zero_after_expand_mul_copy

iszero_mock = mock.Mock(side_effect=_iszero_copy)
iszeroafterexpandmul_mock = mock.Mock(side_effect=_is_zero_after_expand_mul_copy)

@mock.patch('sympy.matrices._is_zero_after_expand_mul', iszeroafterexpandmul_mock)
@mock.patch('sympy.matrices._iszero', iszero_mock)
def test_1():
    Matrix([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]).det(method='lu')

@mock.patch('sympy.matrices._is_zero_after_expand_mul', iszeroafterexpandmul_mock)
@mock.patch('sympy.matrices._iszero', iszero_mock)
def test_2():
    Matrix([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]).det(method='bareiss')


#Print how many times each intercepted function is being called
test_1()
print("Total number of _iszero calls from det(method='lu') :",iszero_mock.call_count)
print("Total number of _is_zero_after_expand_mul calls from det(method='lu') :",iszeroafterexpandmul_mock.call_count)
iszero_mock.reset_mock()
iszeroafterexpandmul_mock.reset_mock()

test_2()
print("Total number of _iszero calls from det(method='bareiss') :",iszero_mock.call_count)
print("Total number of _is_zero_after_expand_mul calls from det(method='bareiss') :",iszeroafterexpandmul_mock.call_count)
iszero_mock.reset_mock()
iszeroafterexpandmul_mock.reset_mock()
Total number of _iszero calls from det(method='lu') : 7
Total number of _is_zero_after_expand_mul calls from det(method='lu') : 0
Total number of _iszero calls from det(method='bareiss') : 0
Total number of _is_zero_after_expand_mul calls from det(method='bareiss') : 4

Which seems able to intercept any calls in the routine, and collecting the number of calls, of any internal or external APIs used within a function.

However, I don't know that this feature is yet implemented in sympy's pytest or travis.

Ayushman Koul
@ayushmankoul
Hello @jksuom @asmeurer @moorepants I would like to work on this sympy/sympy#15178.Please let me know how can we check the actual speed of execution of these methods and do we need to alter the code for solve method so it does not return inverse of matrix ?
S.Y. Lee
@sylee957
@sudz123
I had introduced some changes to test_plot.pyrecently, but I am unsure about your issue though.
I think you should open up a new issue about that, before any new bumps on this thread shadows.
Sudarshan Kamath
@sudz123
Sure @sylee957 I'll open up an issue.
Aaron Meurer
@asmeurer
@sylee957 we don't really have mock tests in SymPy. It's better to just test the behavior, via some input that failed before but works now.
Unless it is just a performance improvement. In that case, you can add a benchmark to the benchmarks repo. Or if it's a major improvement you can add a test that runs quickly without the improvement but would hang without the improvement, so any regression would easily be noticed.
Henry S. Harrison
@hsharrison
Hi, I've been getting this error with autowrap using the f2py backend:
error: Command "/usr/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops -I/tmp/tmps06bd4m5/src.linux-x86_64-3.7 -I/home/hen/miniconda/envs/py37/lib/python3.7/site-packages/numpy/core/include -I/home/hen/miniconda/envs/py37/include/python3.7m -c -c wrapped_code_1.f90 -o /tmp/tmps06bd4m5/wrapped_code_1.o" failed with exit status 1
wrapped_code_1.f90:54:13:

 REAL*8 :: Mod
             1
Error: Symbol ‘mod’ at (1) already has basic type of REAL
I was in here a couple months ago and it was suggested it could be a Windows issue, so I finally tried it out on Linux. Same problem
I tracked it down to a duplicated line in the generated code
...
REAL*8, parameter :: pi = 3.1415926535897932d0
REAL*8 :: Mod
REAL*8 :: Mod
...
So, I guess my questions are: where to look in SymPy for the source of this problem? Probably over my head to try to fix it, I have zero familiarity with the interals, but I could try.
Or, what's the easiest way to work around this, i.e. intercept the code and modify it before the compilation step
Any advice would be appreciated
Aaron Meurer
@asmeurer
Looks like a bug in the code generator if that's invalid fortran
Jason K. Moore
@moorepants
@hsharrison I suggest opening an issue on the sympy repository with the input sympy expression that causes this. Include example input and output.