2022-06-04 01:30:06 +0100 | received badge | ● Famous Question (source) |
2021-06-04 20:22:43 +0100 | received badge | ● Famous Question (source) |
2021-03-12 13:36:46 +0100 | received badge | ● Notable Question (source) |
2021-03-12 13:36:46 +0100 | received badge | ● Popular Question (source) |
2020-11-09 03:29:59 +0100 | received badge | ● Notable Question (source) |
2020-05-24 08:53:03 +0100 | received badge | ● Famous Question (source) |
2020-03-06 12:22:02 +0100 | received badge | ● Famous Question (source) |
2019-12-09 10:06:50 +0100 | received badge | ● Popular Question (source) |
2019-10-20 10:47:02 +0100 | received badge | ● Famous Question (source) |
2019-01-13 22:45:14 +0100 | received badge | ● Popular Question (source) |
2019-01-13 22:45:14 +0100 | received badge | ● Notable Question (source) |
2018-12-16 11:23:45 +0100 | received badge | ● Notable Question (source) |
2018-10-26 19:14:03 +0100 | received badge | ● Notable Question (source) |
2018-09-30 07:48:52 +0100 | received badge | ● Popular Question (source) |
2018-06-15 21:47:41 +0100 | received badge | ● Popular Question (source) |
2018-02-11 18:56:11 +0100 | asked a question | iteration of a matrix Hello community, I have the following question. I have a matrix defined as K. And its diagonal defined, for instance, as Now I have a code : So the first three rows are more interesting for the problem. The problem is, this code changes each entry, not returning the previous one to the initial position. So it changes the diagonal as following: |
2017-12-13 15:08:16 +0100 | asked a question | saving to a .csv file In my computations I got a list of strings: I need to save it as .csv file, each element row by row, ideally like this: I use a code: But what I get in my .csv looks like this: Why does it add commas in between? How can I get rid of them? |
2017-12-11 19:36:46 +0100 | commented answer | Keys of a dictionary Thank you, it works better now. I think the problem was because of the keys being matrices. Why do we need this dictionary? I need to find minimal values of my function and then find the corresponding vectors for those minimal values. Initially I thought, it could be easy to just define a dictionary like this and find corresponding vectors this way. |
2017-12-11 13:31:41 +0100 | commented answer | Keys of a dictionary Thanks a lot for your answer and help, but it seems that the problem remained the same. Keys of a dictionary are matrices and I cannot get specific preimage. For example for your last example if I type If I work with real number instead of integers ZZ, it does not work either |
2017-12-10 18:54:14 +0100 | received badge | ● Commentator |
2017-12-10 18:54:14 +0100 | commented question | Keys of a dictionary Here it is: |
2017-12-10 17:42:34 +0100 | commented question | Keys of a dictionary I think the problem is that u is a matrix, is there a way to convert it to a number ? |
2017-12-10 17:06:26 +0100 | commented question | Keys of a dictionary the best I can get, but the problem remains the same: |
2017-12-10 16:13:39 +0100 | commented question | Keys of a dictionary if I change the last part of my code to: (results are defines before as list or tuple of all u) the problem with keys seems to be solved, but I do not get appropriate vectors as preimages, instead I get (1, 1, 1, 1, 1) for all u |
2017-12-10 15:19:05 +0100 | commented question | Keys of a dictionary The code looks like this: The problem is most likely because I have set u immutable, but I need to get preimages for my function u = w * K * v |
2017-12-10 14:43:41 +0100 | asked a question | Keys of a dictionary Hello guys, I have a piece of code to get a dictionary of preimages of a function. These look like this: if I look for But when I try to get a particular preimage like even though it is in a dictionary. Or if I try I get another error Could someone please help to solve this ploblem ? |
2017-12-07 16:22:57 +0100 | marked best answer | Corresponding value of a parameter Hello, I am quite new to Sage and I have the following question. In my computations I have a quadratic form: $x^T A x = b $ , where the matrix A is defined already as a symmetric matrix, and x is defined as as all combination of $[0,1]$ repeated n times. I got a set of values for $b$ and extracted few of them from the set. Now, I need to identify which $x$ is corresponding to a particular value of $b$. Is there any command to do so? If it is possible. Thank you for help. |
2017-12-07 16:22:47 +0100 | marked best answer | remember and collect values/output Hello, I am working with a function that involves random values. Thus, every time I run my code I get different values(in my case it is a set of values). When I get my output I want Sage to remember it and collect it every time I run my code. At the end I'd like to get a list of sets that has been accumulated every time I ran my code. Is there a way to do it? I tried to research this topic and haven't found anything except saving a list to .txt file. |