2022-07-12 05:45:08 +0200 | received badge | ● Nice Question (source) |
2022-05-15 21:35:11 +0200 | received badge | ● Popular Question (source) |
2019-09-08 05:25:09 +0200 | received badge | ● Famous Question (source) |
2019-04-11 21:29:25 +0200 | commented answer | Quicker expansion of multivariate polynomials You're completely right, they are symbolic expressions! I think I'll investigate the savings I can make by switching over to real polynomials before I go any further down the expansion rabbit hole. If I ask the question again I'll certainly post my code, but for now I think it's better left unposted, its a bit of a behemoth. Thanks! |
2019-04-11 19:41:03 +0200 | asked a question | Quicker expansion of multivariate polynomials Hi everyone, I'm working on a project that involves first generating polynomials, then checking to see if certain terms exist within them. Essentially, I have a function This is a particularly small example, the polynomials expand quite rapidly as the problem grows in size, but this example should give an idea of generally what they look like. Next, my program must check too see if specific terms exist in the expanded form of the polynomial. Currently, I do this by first expanding the polynomial with the Sage My issue is that as the polynomial grows, the completion time of the Is there any way around this? Possibly a more efficient function that anybody knows of? I know that Sage is not really the best option for large computations like this, but I'm looking for a way to at least slightly improve performance while I research a longer-term solution. Thanks! |
2018-11-26 03:57:39 +0200 | received badge | ● Notable Question (source) |
2018-11-02 16:19:18 +0200 | received badge | ● Popular Question (source) |
2018-02-21 16:04:13 +0200 | commented answer | Getting my own module to work in Sage Turns out it was a mistake that I was making, not a code problem! Sorry for troubling you guys, turns out that first answer was totally correct! |
2018-02-21 14:25:09 +0200 | received badge | ● Editor (source) |
2018-02-21 00:01:00 +0200 | commented answer | Getting my own module to work in Sage For sure. The entire document is pretty long, but I've taken what I think are the most important parts. Let me know if anything else seems important. Here's the header of the document (everything I'm importing): and here's the beginning of the function that gives the above-mentioned error when I call it: it's the first 'var("x" + str(j)) there that's giving me the error. |
2018-02-20 22:20:34 +0200 | commented answer | Getting my own module to work in Sage Unfortunately still getting the same error, any other ideas? |
2018-02-20 21:54:48 +0200 | asked a question | Getting my own module to work in Sage Hey everyone. I wrote a sage module that defines a couple functions that I'd like to be able to import into sage any time I want. From what I've researched, it seems the way to do this is save the file that defines the functions as a .py file, then put it into sage's version of python. I've done that, and sage imports the file just fine without errors, except when I attempt to call functions from the file in the sage prompt, it gets stuck on the first sage-specific function, in this case var(). I get this error message: I've tried adding 'from sage.all import *' to the beginning of the file, and it doesn't create an error, but it also doesn't fix the problem. Am I missing something really easy? How do you get sage to recognize the sage functions? |
2018-02-20 21:41:28 +0200 | received badge | ● Scholar (source) |
2018-02-20 21:41:25 +0200 | received badge | ● Supporter (source) |
2018-02-20 21:40:46 +0200 | commented answer | Converting strings into expressions Thank you! This worked perfect for me |
2018-02-15 23:33:14 +0200 | received badge | ● Student (source) |
2018-02-15 23:25:00 +0200 | asked a question | Converting strings into expressions Hey everyone,
This is probably pretty straightforward, but I couldn't find any straightforward answers with google searching. I'm looking for a function that works in the same way as python's str() and float() functions, but turns variables (especially strings) into sage's different classes of variables, like expressions.
For example, if I have string variable:
|