Ask Your Question

bruno171092's profile - activity

2020-08-14 01:47:04 +0100 received badge  Notable Question (source)
2019-07-24 07:38:21 +0100 received badge  Famous Question (source)
2019-05-23 14:23:32 +0100 received badge  Popular Question (source)
2019-04-10 21:58:08 +0100 received badge  Famous Question (source)
2019-04-10 21:58:08 +0100 received badge  Notable Question (source)
2018-10-07 04:24:49 +0100 received badge  Popular Question (source)
2018-05-21 08:00:02 +0100 received badge  Popular Question (source)
2018-04-30 17:03:05 +0100 received badge  Famous Question (source)
2017-07-14 20:11:38 +0100 received badge  Notable Question (source)
2017-03-20 18:10:22 +0100 received badge  Popular Question (source)
2016-10-26 15:40:29 +0100 received badge  Notable Question (source)
2016-10-26 15:40:29 +0100 received badge  Popular Question (source)
2016-08-19 11:13:06 +0100 received badge  Notable Question (source)
2016-08-19 11:13:06 +0100 received badge  Popular Question (source)
2015-12-31 00:24:48 +0100 asked a question line numbers in web notebook

I use Sage in my Mozilla Firefox browser as notebook and wanted to know how i get line numbers in my computing cells.

2015-12-31 00:19:24 +0100 commented question Declare variable as function output

It is ok :) I just forgot to use return ;)

2015-12-31 00:18:36 +0100 commented answer Declare variable as function output

Thanks :) That was exactly the problem. I only used print instead of return :)

2015-12-28 15:32:16 +0100 asked a question Declare variable as function output

hello guys, i wrote a new function, lets call it "func", that has some matrix as input and also some matrix as output. the thing is, i want to declare the last output of the function as a new variable x ( x=func(A) for a given A) the problem is: if i say

x = func(A)
print x

i get :

none

I guess the problem is, that i calculate more than one thing while the function is running, but at the end i just want to able to use that one single output of the function for further use...

2015-12-23 14:27:45 +0100 asked a question Naming variables in a loop

I have this problem: Lets say i have an matrix A and use A.gram_schmidt() on it. then i get a matrix B whose rows are orthogonal. So what do i do now if i want use the vectors of the rows. How can i make them to variables practical? I tried this:

O, t = A.gram_schmidt() 
for i in range(n):
    wi = O.row(i)

But clearly this doesnt work, because sage doesnt identiy the "i" in "wi"...

2015-12-23 12:06:03 +0100 commented question Function with Matrix input

Oops... that was quite some fail... Sorry :)

2015-12-23 10:55:33 +0100 asked a question Function with Matrix input

Hello Guys i have the following problem.

I want to write a function whose input is a Matrix. A small example:

    def Dimension(Matrix):
        n = Matrix.nrows()
        return n
  A = ([1,0,0],[0,1,0],[0,0,1])
  print Dimension(A)

but then i get :

AttributeError: 'tuple' object has no attribute 'nrows'

How can I write i function that has an Matrix as input?

2015-11-28 22:38:24 +0100 received badge  Commentator
2015-11-28 22:38:24 +0100 commented answer Saving my sage session into a .txt file from Interactive Shell

IOError: [Errno 2] No such file or directory: '/home/nbruin/hist.txt'

I thank you a lot buddy. But i dont want to cause you any more trouble... Forget it

2015-11-28 22:06:39 +0100 commented answer Saving my sage session into a .txt file from Interactive Shell

well the information is right except that my files arent saved there anyway. and your tipp with notebook isnt working either. "cp" is not defined...

I have no clue what sftop-ing is... and I somehow feel like i am a little bit too much of an computer noob to get it right...

2015-11-28 20:52:52 +0100 commented answer Saving my sage session into a .txt file from Interactive Shell

Well thanks a lot... I got out, that the path is

/home/sage

but unfortunately i have no clue how i get there... Sorry buddy, that i am still not able to do it after all your efforts :/

2015-11-28 11:15:42 +0100 commented answer Saving my sage session into a .txt file from Interactive Shell

Hmm i used the history command.... but now i dont find the file -_- I even searched for it with the windows-function... but nothign is found... God... that Virtual Machine for Windows is frustrating... Do you have Linux or Windows yourself?

2015-11-27 22:02:48 +0100 asked a question Saving my sage session into a .txt file from Interactive Shell

Hello guys, I have the following question:

Lets say i run a sage session and at the end i got this written in my Interactive Shell after the session

sage: Zmod(7)
Ring of integers modulo 7
sage: R.<x> = Zmod(7)[]
sage: R
Univariate Polynomial Ring in x over Ring of integers modulo 7
sage: RR = R.quotient(x^7 - 1)
sage: RR
Univariate Quotient Polynomial Ring in xbar over Ring of integers modulo 7 with modulus x^7 + 6
sage: f = RR(x^6-x^4+x^3+x^2-1)
sage: f
xbar^6 + 6*xbar^4 + xbar^3 + xbar^2 + 6

And now i want to save all of the above into a txt-file. Is that possible and when yes how?

2015-11-25 17:49:34 +0100 received badge  Nice Question (source)
2015-11-22 20:02:21 +0100 asked a question Multiple outputs with Sage Notebook

Hello Guys,

i have the following question. I use Sage on Windows so I use the Sage Notebook in my browser. I wanted to know if there is a possibility to get more than one output from that without going to a new "compute cell" for everything i want to be computed... For example: When i have

sage: Zmod(7)  +++
sage: R.<x> = Zmod(7)[]
sage: R +++
sage: RR = R.quotient(x^7 - 1)
sage: RR +++
sage: f = RR(x^6-x^4+x^3+x^2-1)
sage: f +++
sage: g = f^(-1)
sage: g +++
sage: g.parent() +++
sage: g*f +++
sage: f*g +++

i only get output from the last command (as result 1) But i want to get output from every line i marked above with +++. Is there annother possiblilty than using a new compute cell after every line i want to have output from?

2015-11-22 19:52:47 +0100 marked best answer Calculate Inverses

Hello Guys, i have the following problem.

I got the Ring $ R = \mathbb{Z} /(x^7 -1)$ and the polynom f(x) = $x^6 - x^4 +x^3 + x^2 -1 \in R$ and want to compute the inverse of f(x), $f(x)^{-1}$. How do I do that?

2015-11-22 19:52:47 +0100 received badge  Scholar (source)
2015-11-22 19:52:46 +0100 commented answer Calculate Inverses

Thanks once more.

2015-11-22 15:43:32 +0100 commented answer Calculate Inverses

Thanks a lot. Sorry to bother you more, but... when i use $ R = (\mathbb{Z} /7 \mathbb{Z}) /(x^7 -1)$ instead, does it work the same? And in you line 3 you say: "f = RR(x^6-x^4+x^3+x^2-1)"... i dont know exactely what this is good for (like i said... i am totally new to sage). Does that mean you are are looking at x^6-x^4+x^3+x^2-1 as an element in RR?