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)
def issymbolic(*args):
'''
Test is some of the element of args list is an
instance of sympy
Parameters
----------
args: list
List with differents types of elements they
could be float, int or sympy instances
Returns
-------
Return True if someone of the elements of args list is a
sympy instance, otherwise return False.
'''
from sympy import core
return True in [isinstance(args[i],tuple(core.all_classes)) for i in range(len(args))]
from sympy.physics.quantum import Commutator, IdentityOperator, Operator
from sympy.physics.quantum.operator import DifferentialOperator
from sympy import Derivative, Function, Symbol
from sympy import sqrt
f = Function('f')
y = Symbol('y');x = Symbol('x');z = Symbol('z')
p1 = DifferentialOperator(-1j*Derivative(f(x,y),x),f(x,y))
p2 = DifferentialOperator(-1j*Derivative(f(x,y),y),f(x,y))
H = (p1**2 + p2**2)/2 - DifferentialOperator((z/(sqrt(x**2 + y**2)))*f(x,y),f(x,y))
Lz = x*p1 - y*p2
com_lh = Commutator(H,Lz)
com_lh.doit()
from sympy import *
x, y, z = symbols('x y z')
steradian_expr = integrate(z / (x**2 + y**2 + z**2)**1.5, (x, -1, 0), (y, -1, 0))
steradian = steradian_expr.evalf(subs={z: 10})
print(steradian)
steradian_expr = integrate(z / (x**2 + y**2 + z**2)**1.5, (x, 0, 1), (y, 0, 1))
steradian = steradian_expr.evalf(subs={z: 10})
print(steradian)
# output
-0.00990115187117096
0.00990115187117096
The integrand is symmetric about x and y.meijerint
that cannot reliably be used on the negative real axis. Hence the first integral has wrong sign.
[]
. That's why?from sympy.solvers import solve
from sympy import Symbol
from sympy import sqrt
x = Symbol('x')
y = Symbol('y')
z = Symbol('z')
expr = [2130 - sqrt((x-8413)**2 + (y-13233)**2 + (z-544)**2)/4700,
2150 - sqrt((x-8384)**2 + (y-12857)**2 + (z-524)**2)/4700,
2258 - sqrt((x-8941)**2 + (y-12632)**2 + (z-549)**2)/4700,
2198 - sqrt((x-8691)**2 + (y-12737)**2 + (z-531)**2)/4700]
args = [x,y,z]
res = solve(expr,args)
print(res)
from sympy import *
n = 2
A = MatrixSymbol('A', n, n)
x = MatrixSymbol('x', n, 1)
b = MatrixSymbol('b', n, 1)
solve(A*x-b, x)
TypeError: First argument of MatrixElement should be a matrix
Ambiguity:
# Python 3.9.16 (main, Dec 7 2022, 01:11:51)
# [GCC 9.4.0] on linux
from sympy import evaluate, Rational, sympify
rational1 = sympify('1/5 + 1/4', rational=True, evaluate=False)
with evaluate(False):
rational2 = Rational(1, 5) + Rational(1, 4)
rational1 == rational2
False
from sympy import __version__
__version__
'1.11.1'
but
rational1
1/5 + 1/4
rational2
1/5 + 1/4
rational1.doit() == rational2.doit()
True
Hi guys, I'm trying to plot z = 0 in 3D (just a plane on XY),
from sympy import symbols
from sympy.plotting import plot3d
x, y, z = symbols('x y z')
plot3d(0)
but I'm getting:
In [14]: plot3d(0)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[14], line 1
----> 1 plot3d(0)
...
ValueError: Argument Z must be 2-dimensional.