2021-03-09 21:34:19 +0200 | received badge | ● Notable Question (source) |
2021-03-09 21:34:19 +0200 | received badge | ● Popular Question (source) |
2018-04-12 16:06:53 +0200 | received badge | ● Good Answer (source) |
2016-11-05 11:37:59 +0200 | received badge | ● Necromancer (source) |
2016-11-02 21:51:56 +0200 | received badge | ● Good Answer (source) |
2016-08-06 16:57:59 +0200 | received badge | ● Nice Answer (source) |
2014-01-13 07:29:36 +0200 | received badge | ● Critic (source) |
2013-09-03 10:45:28 +0200 | commented question | error in Posets examples (order ideal function) In such a situation, look at *your* documentation, to see if this example exists in *your* version of Sage; it does'nt for Sage 5.8 (my version), hence it's a recent feature. |
2013-06-13 09:12:51 +0200 | commented answer | ergodic markov chain - steady state "Iterating a lot" is the obvious way for picking a "random" element "in" the steady state, problems arise with the specification of "a lot" :-) And in real life, matrices which describe Markov chains are rather large. |
2013-06-12 11:39:54 +0200 | commented question | ergodic markov chain - steady state Question looks too general, ask Google about "coupling from the past". |
2013-04-08 09:12:05 +0200 | commented question | Distinct (nonisomorphic) trees http://www.sagemath.org/doc/reference/graphs/sage/graphs/graph_generators.html#sage.graphs.graph_generators.GraphGenerators.trees is a bit hidden |
2013-03-27 04:57:40 +0200 | answered a question | How do I evaluate sum() containing factorial()? The answer to the 'howto' question is: don't use symbolic calculus when it's not necessary (see preceding answers). Here is a tentative answer to the 'why' question. Yes there are special rules for evaluation of symbolic sums: This is indeed surprising, but think of: Do you prefer this symbolic expression, or its full expansion? Hence there is no perfect strategy for evaluation of symbolic expressions, and there are also theoretical obstacles because canonical forms can't exist for symbolic expressions, even for very narrow classes. |
2013-03-26 05:25:50 +0200 | received badge | ● Nice Answer (source) |
2013-03-24 08:41:21 +0200 | answered a question | List (or set) of matrices To complete ppurka's answer, here is your code with corrections: Note that output of ListM(3) looks ugly, but this is a formatting "bug" when you display such a list, output is correct. Python has very nice syntax for "list comprehensions", you may write: Of course in this case using MatrixSpace(GF(p),2,2) is definitely the right solution. Good luck with Sage ! |
2013-03-23 12:03:00 +0200 | answered a question | How do I evaluate sum() containing factorial()? "Why do stuff in symbolics", I agree with ppurka, and I suggest: which uses the built-in Python function sum. [edit] After precisions added by 'stan', I'm puzzled, Sage gives me the (not very surprising) expected answers: |
2013-03-22 13:07:41 +0200 | received badge | ● Commentator |
2013-03-22 13:07:41 +0200 | commented question | sage_eval: invalid syntax @kcrisman 'y' is an input, not an output. |
2013-03-22 09:04:54 +0200 | commented question | sage_eval: invalid syntax What's wrong with a simple assignment y=3, why do you need sage-eval ? |
2013-03-22 08:44:08 +0200 | answered a question | How to get a Boolean from the type of an object? For matrices, I don't know, this is a complex topic in Sage. For tuples of pairs, this is pure Python, and I suggest: Note that if you accept lists in addition to tuples, you can use: inside these functions and so on. |
2013-03-11 09:42:35 +0200 | received badge | ● Enthusiast |
2013-02-28 09:21:01 +0200 | answered a question | c++ cython in the notebook On my installation, in a notebook cell: yields but adding the magic commentbelow (see http://wiki.sagemath.org/faq) makes gcc quite happy: |
2013-02-27 09:57:34 +0200 | answered a question | How to unpack .spkg files The answer is rough: it's impossible to install Sage on a Windows system ! It's a feature, not a bug :-) See e.g. http://en.wikipedia.org/wiki/Sage_(ma... |
2013-02-25 13:57:18 +0200 | answered a question | How are list of matrices printed by sage? Yes, in interactive Python sessions, output uses Sage defines it's own module is not a valid representation for [A,B] if there are newlines inside repr(A) and repr(B), while is always a valid LaTeX description of [A,B]. |
2013-02-04 09:06:22 +0200 | commented question | Excercises, randomly generated and automatically checked What is an "excercise" ? :-) |
2013-01-09 14:24:11 +0200 | commented answer | Recursive backtracking function: how to clear variables on new function call? Look at the first path returned by get_paths in my example: [[2, 1], [2, 1, 1], [2, 2, 1], [3, 2, 1], [3, 3, 1]], it's coded by the last skew tableau returned by sst.list(): [[None, None, 3], [None, 2, 4], [1]], because we add the first cell in a third new row, the second one is appended to the second row, the third one to the first row, and the fourth one to the second row (again). Anybody familiar with the subject may explain you the correspondence, it's easier on a sheet of paper or on a blackboard :-) |
2013-01-06 09:24:55 +0200 | answered a question | Need to improve a function in sage which checks trueness of expressions in an example. Your question is a bit daunting, but let us make some experiments (Sage predefines x to be a global indeterminate): Who is this guy? His nickname is SR: One of the main goals of symbolic calculus is to solve equations: Assume is badly documented, but looks useful in this context: So far so good, and back to your question: is Sage a proof checker, which could help to check derivation of new propositions from assumptions? Answer is definitely negative: This very strange result is explained in a preceeding post. Imho, no hope for improving your function, Sage is not the right tool. If you are interested in proof checkers, take a look at Coq, but this is another story. |
2013-01-05 16:52:12 +0200 | answered a question | Recursive backtracking function: how to clear variables on new function call? I think the following code gives the good output (but is far from optimal, many computations are repeated again and again, as in the naive recursive computation of the Fibonacci sequence), here parameters are assumed to be partitions: For example: Actually we are computing functions already defined in Sage: Use Amitiés. |
2013-01-05 14:35:58 +0200 | answered a question | Recursive backtracking function: how to clear variables on new function call? This is a very partial answer, but in a Python crash course (by William Stein I presume, now I can't find the link) I learned this example: with the following astonishing successive outputs: (this is pure Python, Sage is not guilty). |
2013-01-05 13:39:14 +0200 | commented question | Need to improve a function in sage which checks trueness of expressions in an example. You are probably a high school student who is struggling with quadratic equations and so on, I can tell you that Sage is definitely useless for learning how to handle such computations and for acquiring the necessary skills in this domain. Sorry and good luck with a more traditional approach ! |
2013-01-04 13:44:04 +0200 | commented question | Need to improve a function in sage which checks trueness of expressions in an example. You "really need comments and suggestions" about very cumbersome expressions, and in a precedent post it was "very necessary" for you "to understand this behavior of sage", please what does it mean ? |
2013-01-03 06:22:00 +0200 | answered a question | Express domain membership I don't know if you actually need symbolic expressions, otherwise tests are very straightforward: Note that tests using pure Python isinstance give different output, no surprise: |
2012-12-30 16:33:14 +0200 | received badge | ● Nice Answer (source) |