A computer algebra system written in pure Python http://sympy.org/ . To get started to with contributing https://github.com/sympy/sympy/wiki/Introduction-to-contributing
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
Implemented leading term and ns… (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
made changes (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
added tests for leading terms f… (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
Changed the outputs being retur… (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
Changed leading term being ret… (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
Removed Redundant block from le… (compare)
anutosh491 on GSoC_Pr4.3_Implementing_some_series_method_for_uppergamma_lowergamma_expint_and_other_errors_functions
Implemented some series methods… (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
Removed Order term (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
added test cases for limits and… (compare)
anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function
Implemented leading term and ns… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
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)
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)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Changed if condition for bessel… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Improved code quality (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
changed is function to equality… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
fixed failing tests (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed code quality (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added case where number of term… (compare)
plt.plot(A,B)
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.
raises()
.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?
print("_eval_det_bareiss: iszerofunc = ", iszerofunc.__name__)
to see that everything works as expected.
@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.
solve
method so it does not return inverse of matrix ?
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
...
REAL*8, parameter :: pi = 3.1415926535897932d0
REAL*8 :: Mod
REAL*8 :: Mod
...