2022-12-31 10:20:30 +0200 | received badge | ● Notable Question (source) |
2020-03-26 18:58:44 +0200 | received badge | ● Popular Question (source) |
2017-08-06 14:07:40 +0200 | received badge | ● Popular Question (source) |
2017-03-18 16:33:13 +0200 | received badge | ● Famous Question (source) |
2017-02-13 17:05:15 +0200 | received badge | ● Notable Question (source) |
2014-07-12 19:25:48 +0200 | received badge | ● Notable Question (source) |
2014-06-29 03:15:44 +0200 | marked best answer | Symbolic matrices and "integrity" of their inverse I have to solve the following problem: Does a matrix $G\in GL(n,\mathbb{Z})$ exists such that $$ G\times A\times G^{-1}=B $$ being $A,B$ given matrices in $\mathbb{Q}$? Doing everything by hand, I finally find myself with a bunch of symbolic matrices. Now I have to check if they can lay inside $GL(n,\mathbb{Z})$, i.e. if there are integer values for the variables in the matrix such that the matrix is integer, invertible and with integer inverse. E.g.: $$\left(\begin{array}{cc}x & 0 \\ 0 & y\end{array}\right)$$ does the trick only for $x=y=1$. Is there a quick method within Sage to solve that last problem? Thanks! |
2014-06-29 03:15:24 +0200 | marked best answer | WeylCharacterRing and coroots / Dynkin labels This might be a stupid question coming from a poor physicist, but there we go: I would like to work with representations of Lie algebras, having the weights expressed in terms of the times they contain each of the fundamental weights, what we call 'Dynkin labels'. It seems to correspond to the style='coroot' when declaring a WeylCharacterRing: if I want the representation whose highest weight is 3 times the 1st fundamental weight, I ask for That said, I get: but I would like to get which is the right answer in Dynkin labels. It would be easy to go from one place to the other if I could get the fundamental weights in the same ambient space as the weights: in this case (2/3, -1/3, -1/3) and (1/3, 1/3, -2/3). But I find no way to get them in general. From the 1st example: which is not the answer I would expect, and seems inconsistent to me, since the highest weight of the representation, (2/3, -1/3, -1/3), is precisely the 1st fundamental weight. Cheers, JesúsTorrado |
2014-06-29 03:15:24 +0200 | marked best answer | Not able to relabel a Cartan type in the notebook In the shell: But in the notebook: In: Out: Strange, isn't it? |
2014-06-29 03:14:51 +0200 | marked best answer | Collapsing cells - comments in directives Dear all, I know that with the directive '%hide' at the beginning of a cell it can be collapsed. It is useful, but it would be much more if I could see something else from the collapsed cell, in addition to the '%hide'. So, is there any trick? Putting a comment in the first line and the '%hide' in the second does not work, neither putting a comment in the same line that '%hide'. Thanks! |
2014-05-16 12:05:39 +0200 | received badge | ● Popular Question (source) |
2013-10-21 21:37:14 +0200 | received badge | ● Nice Answer (source) |
2013-08-07 09:21:43 +0200 | received badge | ● Enthusiast |
2013-08-03 12:31:21 +0200 | answered a question | speed up execution time of script (Cython or other...) Take a look at the last section of this. As it is quoted there, «Premature optimization is the root of all evil». So use the profiler (or put prints in the appropriate places) to find out what parts of your calculation are taking the most, and the we will be able to give you more specific answers. Good luck! |
2013-08-03 12:26:37 +0200 | marked best answer | Symbolic matrices and "integrity" of their inverse A direct approach (not using symbolic solving) could be: See |
2013-08-03 12:26:35 +0200 | commented answer | Symbolic matrices and "integrity" of their inverse That's a good one, thanks! |
2013-08-03 12:11:27 +0200 | answered a question | multiple cores - adventage - How enable it? It is possible: just check the nice answer by @niles to a similar question: http://ask.sagemath.org/question/702/whenhow-to-use-parallel. There you have a clear example. |
2013-07-19 10:10:45 +0200 | answered a question | high resolution image - matplotlib Go for a vector format, like svg or pdf, and then open in, say, Gimp. At the moment of opening, you can specify the resolution easily. |
2013-06-24 03:38:30 +0200 | received badge | ● Good Question (source) |
2013-05-31 11:56:50 +0200 | answered a question | run Python file from command line in Sage It is enough to add to sageruntest.py: Alternatively, the 2nd line (yours) is enough if you rename your file to sageruntest.sage (then it will be preparsed by Sage). |
2013-05-29 06:34:47 +0200 | received badge | ● Organizer (source) |
2013-05-28 13:57:20 +0200 | commented answer | Embedding R graphics device in Sage notebook Well, in the X11 case it doesn't embed either, but does exactly as you say. I guess @jaia will be happy with that :) But yeah, it would be great to have it embedded, and the same for the interactive interface of matplotlib. Unfortunately, my knowledge of the notebook is close to zero. I hope someone gets to do it at some point! |
2013-05-28 12:24:13 +0200 | commented answer | Embedding R graphics device in Sage notebook @kcrisman I added your comment. Thanks! |
2013-05-28 09:30:21 +0200 | commented answer | Embedding R graphics device in Sage notebook @jaia: Answer edited. There you have it ;) |
2013-05-28 09:29:41 +0200 | edited answer | Embedding R graphics device in Sage notebook Static plots -- png deviceThe answer seems to be the png device: see the accepted answer of this question. Interactive graphics -- X11 deviceExample: |
2013-05-22 07:40:42 +0200 | received badge | ● Good Answer (source) |
2013-05-08 05:20:09 +0200 | commented answer | Sage for physicists @kcrisman. Thanks for the edit! :) |
2013-05-07 12:24:56 +0200 | answered a question | Sage for physicists Here's another physicist using Sage, in particular doing a PhD, and I can only encourage you to use Sage any time you can :) It cannot do everything that Mathematica does, but it goes the other way around too. For an undergrad, you won't notice the difference if you are patient in learning Sage. As an approach for using Sage as a physicist, I would recommend simply going through the tutorial, and asking here or in sage-support any particular concern you may have, starting right now! |
2013-04-29 05:13:24 +0200 | answered a question | Hidden features of Sage Though is general for python, it is always worth reading: Code like a Pythonista |
2013-04-25 13:13:44 +0200 | commented answer | matplotlib x11 window Sorry, maybe I didn't understand it completely: do you want to do it from the command line or from the notebook? In the notebook, the savefig('') should work, while in the command line, in the worst case, you can always save the plot to a file and see it in any image viewer, with plt.savefig('some_path_and_file_name'). As for the wiki page, as I told you, I haven't tried it myself. Why don't you try to post the errors you get in the sage-support mailing list? (http://groups.google.com.au/group/sage-support) |
2013-04-24 21:09:15 +0200 | answered a question | matplotlib x11 window For the cases in which you don't need interactivity, you can just change your by a If you really want interactivity, you may find this wiki page useful (I haven't tried it myself, I must say). |
2013-04-23 07:28:11 +0200 | received badge | ● Nice Answer (source) |
2013-04-22 09:00:48 +0200 | answered a question | code for tail and head of an edge in a bipartite graph You may want to take a look to this, and in particular this. Good luck! UPDATE Let $G$ be a bipartite graph that you have generated using one of the ways commented in the 2nd link above. Now you want to take an edge and get its head an tail. In order to do that, you can just identify the sets of tails and heads with the "bipartition" method of the graph, and check which of the vertices of an edge is in which set. It could be something like |
2013-04-22 06:00:11 +0200 | received badge | ● Critic (source) |
2013-04-22 06:00:08 +0200 | commented question | Mathcad 14 Help required Wrong forum, lad. Try http://lmgtfy.com/?q=help+mathcad+integral . Good luck! |
2013-04-21 08:17:46 +0200 | commented answer | Numerical and graphical summaries of data Sorry, but I cannot help pointing this out: the 2nd block of code, "d[0]=[x[0] for x in data]; d[1]=[...]" can be written simply as "d0,d1,d2,d3 = zip(\*data)", or "zip(*data)[:4]" if "data" has more than 3 fields. I love python :) |