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.1_Implementing_few_series_methods_for_bessel_functions
added bottom_up simplification … (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
added testing for changes adde… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
removed condition from leading … (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
minor changes (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed failing test (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed code quality failure (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
included exp forms for bessel f… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Minor change (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Refactored mrv_leadterm in grun… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added e.is_negative case for be… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
hanled e.is_negative case for b… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Replacing exp rewrite with trig… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Minor changes (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
added support when exponent of … (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed leading term method for b… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added tests for 7224 (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added tests for series of besse… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added series test for besseli f… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added tests for leading term me… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added nseries method for bessel… (compare)
Hi, There a way to get the negative representation of a matrix ? Example
m1 = Matrix([[2, -1], [3, 12], [1.3, -2]])
applying a function that result toMatrix([[-2, 1], [-3, -12], [-1.3, 2]])
Thx in advance!
not sure if you need it as a function - but if you do - something like the below will get you there
def invert_function(matrix):
result = -matrix
print(str(result))
invert_function(Matrix([[1, 2], [3, 4]]))
# Returns Matrix([[-1, -2], [-3, -4]])
from sympy import IndexedBase, Sum, init_printing, integrate
from sympy.abc import I, N, j, t, x
from sympy.functions import conjugate, exp, sqrt
init_printing()
X = IndexedBase('X')
gamma = (1 / N) * Sum(exp(I * X[j] * t), (j, 0, N))
kernel = N / (2 * (N - 1)) * (1 + sqrt(1 - (4 * (N - 1)) / ((N ** 2) * gamma * conjugate(gamma))))
data = exp(-I * x * t)
kde = kernel * gamma * data
primitive = integrate(kde, t)
Hi, There is a way to see all step that use sympy to reduce a matrix ?
.rref()
Hi, this is similar to a question of mine last week. I am using sympy as a peripheral tool to teach my daughters some math. I have noticed that with some expressions such as the below one that sympy will still simplifysympify ("(sqrt(9))/(sqrt(16))", evaluate=False)
where the result is
3/4
Is it possible to have sympy do something more like this library? If not, I will just import the second library. Still, before I go there I thought I should understand if it is possible in sympy first.
https://github.com/connorferster/handcalcs
handcalcs is a library to render Python calculation code automatically in Latex, but in a manner that mimics how one might format their calculation if it were written with a pencil: write the symbolic formula, followed by numeric substitutions, and then the result.
Because handcalcs shows the numeric substitution, the calculations become significantly easier to check and verify by hand.
To answer my own question (in case anyone is interested in the same question). The python library, handcalcs, does what I need and already integrates well with sympy so that is fine - no real need for me to try and get the same result directly from sympy.
a,b,c = symbols("a b c")
d = a**2 + b*a
f = integrate(d, a)
# handcalcs integrates nicely with sympy
%%render sympy
a =5
b = 10
x = f
# I can get handcalcs to not evaluate/simplify
%%render symbolic
x_pos = sqrt(25) + sqrt(9)
# It seems I cannot with symy - but handcalcs (above example) works fine for me (with sympy) anyway
sympify(sqrt(25) +sqrt(9),evaluate=False)
So, I guess all is good. Thanks!
ref
https://github.com/connorferster/handcalcs#symbolic
You can view the above example results as an image here:
https://ibb.co/HDTvbH0
Hi, There is a way to see all step that use sympy to reduce a matrix ?
.rref()
Hi, this is similar to a question of mine last week. I am using sympy as a peripheral tool to teach my daughters some math. I have noticed that with some expressions such as the below one that sympy will still simplifysympify ("(sqrt(9))/(sqrt(16))", evaluate=False)
where the result is
3/4
Is it possible to have sympy do something more like this library? If not, I will just import the second library. Still, before I go there I thought I should understand if it is possible in sympy first.
https://github.com/connorferster/handcalcs
handcalcs is a library to render Python calculation code automatically in Latex, but in a manner that mimics how one might format their calculation if it were written with a pencil: write the symbolic formula, followed by numeric substitutions, and then the result.
Because handcalcs shows the numeric substitution, the calculations become significantly easier to check and verify by hand.
To answer my own question (in case anyone is interested in the same question). The python library, handcalcs, does what I need and already integrates well with sympy so that is fine - no real need for me to try and get the same result directly from sympy.
a,b,c = symbols("a b c") d = a**2 + b*a f = integrate(d, a)
# handcalcs integrates nicely with sympy %%render sympy a =5 b = 10 x = f
# I can get handcalcs to not evaluate/simplify %%render symbolic x_pos = sqrt(25) + sqrt(9)
# It seems I cannot with symy - but handcalcs (above example) works fine for me (with sympy) anyway sympify(sqrt(25) +sqrt(9),evaluate=False)
So, I guess all is good. Thanks!
ref
https://github.com/connorferster/handcalcs#symbolicYou can view the above example results as an image here:
https://ibb.co/HDTvbH0
just a quick side note to stop some frustration. I edited in the comments in the render cells after executing the cells. At the time, I didn't realise that the %%render
has to be at the first line - so don't use comments in the same cell if you can help it.
sympy.Stats
module. Doing something like X, Y = Die('X', 6), Die('Y', 6); density(X+Y)
is neat, but if I wanted to get the distribution of the highest of the 2 rolls, how would I do that? density(max(X,Y))
doesn't work - I can see why, but I don't know where to look in the docs for something equivalent that would work. What's the best way for me to learn how to model calculations like this?
x = symbols('x')
f = (6*x+13)/(15) - 2*x/5 -(3*x+5)/(5*x-25)
solveset(f,x) # OUTPUTS 20