2024-02-15 13:37:16 +0200 | received badge | ● Famous Question (source) |
2021-10-24 14:04:20 +0200 | received badge | ● Famous Question (source) |
2021-10-24 14:04:20 +0200 | received badge | ● Notable Question (source) |
2018-05-12 06:00:02 +0200 | received badge | ● Taxonomist |
2017-05-09 14:36:43 +0200 | received badge | ● Popular Question (source) |
2017-05-09 14:36:43 +0200 | received badge | ● Notable Question (source) |
2016-06-15 23:06:55 +0200 | received badge | ● Popular Question (source) |
2013-03-08 14:15:10 +0200 | answered a question | Laurent series, Rational Functions in sqrt(q)? Hearing nothing, I just used the first workaround, made 500 mistakes typing in formulas as predicted, fixed them, and I was done. However, the surprise was that it was less painful than I expected, and it did have the advantage that I solved the problem with the tools I already knew, which I regard as virtuous in some sense. So I'm going to sheepishly call this an answer to my own question. Probably there's a badge for that or something. But I'd still be curious to hear if there's a better way. |
2013-03-08 14:11:40 +0200 | answered a question | Read sparse matrix in Harwell-Boeing Exchange Format Actually it seems that scipy provides basic support for this format starting in version 0.10.0. According to fidelbc's comment, scipy already ships with sage. So I'd tentatively answer "yes", although I haven't tried it. |
2013-03-08 06:01:34 +0200 | received badge | ● Student (source) |
2013-03-07 22:56:16 +0200 | commented answer | sage version of python's execfile Thank you! I'm embarrassed I didn't know that, despite it being in the tutorial... I guess I never worked through it, since I already knew python. Oh, well. |
2013-03-07 22:53:42 +0200 | received badge | ● Scholar (source) |
2013-03-07 22:53:42 +0200 | marked best answer | sage version of python's execfile You can do |
2013-03-07 20:24:57 +0200 | asked a question | sage version of python's execfile What is the sage analogue of python's "execfile()"? How do I ask sage to preprocess and execute a text file full of sage commands? Up till now I've just been using execfile() on the sage command line prompt, because that's what I do in python sometimes. However I just learned the hard way that this is the wrong thing to do; it misses a vital preprocessing step. For example, if I ask for the type of 1/2 on the sage command line, the following happens: Great! that's what I want. However if I put the following into the file "uhoh.py": and then I issue the following command on the sage command line: then I get the output Yes, the integer 1/2. I want the last hour of debugging time back. Of course what's happening is that the text file is being interpreted in pure python, in which 1/2 really does represent an integer division. What is the right thing to do here, rather than execfile()? |
2013-03-03 22:01:08 +0200 | received badge | ● Nice Answer (source) |
2013-03-03 16:16:51 +0200 | commented answer | nilpotent adjacency matrix Got it. Fixed in the edit. What a great problem for learning all this stuff! |
2013-03-03 15:49:40 +0200 | commented answer | nilpotent adjacency matrix OK, now it starts from b_1 - I just used n+1 variables and made the diagonal matrix from the last n of them with a python list slice. As for the sum of the scalar coefficients, the answer is doubtless "yes" but the obvious things I tried haven't worked yet - I haven't worked with quotient rings a whole lot. |
2013-03-03 15:49:01 +0200 | received badge | ● Editor (source) |
2013-03-03 13:46:48 +0200 | received badge | ● Teacher (source) |
2013-03-03 13:21:10 +0200 | commented question | p-part of a class group Could you please post the code that calculates G? |
2013-03-03 13:11:44 +0200 | answered a question | nilpotent adjacency matrix Here's a naive answer, as I am somewhat naive (I just posted a question and, while waiting breathlessly for someone to answer it, I thought I'd just have a look at what other people are asking). No idea how efficient it is, but maybe it's a start. You can construct the ring that you want to work in as a quotient ring of a multivariate polynomial ring. You can then construct the matrix B that you want by multiplying by a diagonal matrix whose entries are the variables you want. Edit: It turns out that OP also wants to compute the sum of the coefficients. I found it kind of tricky to compute this, largely because the quotient ring classes seem not to have a lot of the methods you'd expect. However it's possible to lift an element of the quotient ring to the obvious preimage in the original ring, and since the original ring is a plain old multivariate polynomial ring, you can do all the things you'd normally do in it, like "subs". Naturally substituting 1 for all the variables computes the sum of the coefficients: so, for instance, you could do which hopefully should produce the answer 10 when you run it with OP's example, for instance. This was a great question - at least, I feel like I learned a lot... :) |
2013-03-02 13:26:10 +0200 | asked a question | Laurent series, Rational Functions in sqrt(q)? I need to construct the ring of formal Laurent series in I realize that there's a perfectly good workaround, but I'd be nonetheless very happy if I didn't have to use it. I could just use Laurent series in another variable, like t, I could then define q to be Another workaround which I'm not keen on is to just say and just use symbolic expressions instead. I don't really want to do that either: I like having all the Laurent series methods available and I gather that working in an explicit ring is a lot faster? If I'm misinformed there, then please let me know. Lastly, I'd also like to construct the rational functions in sqrt(q) - same basic problem, as far as I can see. Any help appreciated. |