## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 03:12
smichr commented #22073
• 03:08
• 02:24
asmeurer commented #22073
• 01:52
sympy-bot commented #22137
• 01:52
smichr edited #22137
• 01:49
sympy-bot commented #22137
• 01:49
smichr edited #22137
• 01:11
github-actions[bot] commented #22137
• 01:04
smichr commented #22073
• 00:53
sympy-bot commented #22137
• 00:53
smichr edited #22137
• 00:37
smichr closed #17917
• 00:37
smichr commented #17917
• 00:24
eri-ch forked
• 00:23
smichr opened #22138
• 00:12

smichr on nc_coeff

Update sympy/diffgeom/tests/tesâ€¦ (compare)

• 00:12
smichr synchronize #22137
• 00:11
smichr commented #21986
• 00:10
smichr synchronize #22137
• 00:10

smichr on nc_coeff

Update test_diffgeom.py (compare)

Maarten van der Velde - (Ideogram)
@ideogram
@jksuom (on the subject of the numbers I,E and N) Yes, that is true, because I can't know in advance what variables will be used in the expressions. So, I collect them in a dict and feed that dict to the evalf function.
Asingh421
@Asingh421
hello I am Abhay Singh a second year cse student at IIT Patna,i want to contribute in Mathematics and physics projects for GSOC because math and physics always fascinated me since my school time please guide me.
@Arpan612
@ritwikchakraborty123 @Asingh421 Hi, welcome to sympy! Please find the links below to get started.
Kalevi Suominen
@jksuom
@ideogram How do you define the dict? If you write dict(I=1), you get {'I': 1} whose key is a literal (that probably is not used in the expressions). If you define I as a SymPy symbol, for example, then you can define the dict {I: 1} that has I as a key.
Maarten van der Velde - (Ideogram)
@ideogram

@jksuom Oh,... eh,... terribly confused now,... you are saying I can use a SymPy Symbol as as a key in a dictionary?

ParameterName = "I" # But then dynamiccaly _self.values[Symbol(ParameterName)] = 42

Kalevi Suominen
@jksuom
The keys in a dict argument of subs are usually SymPy objects.
Hari07
@Hari-07
Im running python on ubuntu WSL. when i use the python terminal and write scripts in a folder thats not the sympy folder, throws an error. this gets fixed when i use sys.path.append to include the sympy folder then use import sympy
is there anyway to add it to sys.path permanently
@Arpan612
I think you can do that by adding a python module to sys.path as default
Maarten van der Velde - (Ideogram)
@ideogram
@jksuom Thank you, I'll try that. I completely missed that from the documentation. (Kiitos, I gues)
Kalevi Suominen
@jksuom
@UltimateGamer07 If you run python -m site, you will see the location of USER_SITE. That is a place where you can add local paths permanently in files of type .pth. For example, you can create a file sympy.pth that contains the single line /path/to/sympy.
OmarWagih1
@OmarWagih1
Hello, could anyone review my pull request for the sympy-benchmarks repo here?
sympy/sympy_benchmarks#66
Thank you.
@Arpan612
@asmeurer Could you please tell me where is the source code of SymPy documentation?
I have corrected the code of issue 18891 and I want to make a PR for the same.
Nikhil Maan
@Sc0rpi0n101
Most of the documentation is generated from the docstrings of the class/function being documented.
@Arpan612
So no cataloged folder for the entire documentation exists?
mohit
@mohitacecode
Nikhil Maan
@Sc0rpi0n101

I think it is there https://github.com/sympy/sympy_doc

That's auto-generated. You should not manually make changes to that repo.

IF you want to make changes to the documentation, you should just update the docstring of the respective function/class.
Kalevi Suominen
@jksuom
@Arpan612 The rst-files for Sphinx documentation are in doc/src and its subdirectories.
Megan Ly
@meganly
How do you simplify (sqrt(x)+1)/(sqrt(x)*(x+sqrt(x)) to 1/x? I know using radsimp and cancel works, but am wondering if there is a better way
Aaron Meurer
@asmeurer
@Arpan612 the docs are in the doc/ directory of the main sympy repo. But as @Sc0rpi0n101 noted most of the documentation comes from the docstrings on the functions themselves.
@meganly I don't know if there's a better way. Simplification of algebraic functions is something that SymPy needs to be improved on.
we don't have a function that takes an algebraic function and puts it into canonical form (like cancel does with rational functions)
something that can help here is minpoly. minpoly((sqrt(x)+1)/(sqrt(x)*(x+sqrt(x)), y) gives x*y - 1 meaning that the expression equals 1/x
Aaron Meurer
@asmeurer
I've mentioned it on some issues before, but we should have a simplification function that uses minpoly. If the minimal polynomial is linear or constant then the simplification is trivial. It's harder if the degree is higher because you have to make sure you keep the same root, but it's doable.
Aaron Meurer
@asmeurer
I didn't see any dedicated issue for it so I opened sympy/sympy#18907
Megan Ly
@meganly
The minpoly idea is cool. Is there a canonical form for algebraic functions? If so, what is it?
Aaron Meurer
@asmeurer
I'm not sure if there's a straightforward way to define one.
I think you can do something using the fact that algebraic extensions form a vector space over the extended field. So if you have a basis, then every element of the extension is a linear combination of those basis elements. But there's the question of how to chose that basis in a canonical way.
Megan Ly
@meganly
That's something you could do, but I don't think that works for quotients of algebraic expressions. As far as I know there isn't really a canonical form for algebraic functions like there is for rational
Saanidhya
@Saanidhyavats
After making some changes in pull request #18681 I think it's ready to be merged. It would be helpful if someone could take a look init.
Dhruv Mendiratta
@dhruvmendiratta6
@jksuom @Arpan612 I too am running wsl with the sympy repo in windows. I am not able to run profilers(eg: vprof) I installed in ubuntu on the repo. Also local tests using ./bin/test do not work on ubuntu. So is the solution here simply cloning a wsl version of the sympy repo and keeping its functioning separate from windows?
@Arpan612
Yes, I think this solution will be best for now.
If I get any alternative, I will tell you.
@asmeurer Thank you, Sir.
Maarten van der Velde - (Ideogram)
@ideogram

@jksuom I tried it, and it doesn't seem to make any difference. Everythink works fine, until I introduce a variable I. It then says:

TypeError: can't convert expression to float

Kalevi Suominen
@jksuom
Does the same error occur if you change the name to something else?
Maarten van der Velde - (Ideogram)
@ideogram
No, I tried that. It works fine with X, Y, Z, W, H and L
Kalevi Suominen
@jksuom
What is the difference then? Do you begin by defining I in the same way as I = Symbol('I')? That should be done before creating the expression to which evalf is to be applied so that the expression will involve the symbol I and not the imaginary unit I.
danil179
@danil179
I don't know what is the current state of my PR #17745 as it seems 5 months passed already and I don't see any specific problems with the code right now. In my PR I tried to keep the original printing where possible (and hence my PR keeps the original printing with changes only where necessary and doesn't require code changes in the tests). I think that my solution is near optimal in doing that.