[sage-support] some basics of weave

2010-05-12 Thread Rajeev
Hi, I was trying to learn a bit of weave, but there seems to be some problem. The code I used is import scipy.weave as weave a, b = 10, 5 code = \ ''' int temp; temp = a; a = b; b = temp; ''' weave.inline(code, ['a', 'b']) print a, b When I ran this code in sage notebook, I got the following

[sage-support] Re: some basics of weave

2010-05-12 Thread Harald Schilly
On May 12, 8:09 am, Rajeev rajs2...@gmail.com wrote: Hi, I was trying to learn a bit of weave, but there seems to be some problem. In sage notebook, start the cell with %python in the very first line. This tells sage to evaluate the content as pure python. Second, I suggest you to look into

[sage-support] Re: some basics of weave

2010-05-12 Thread Rajeev
Hi, In sage notebook, start the cell with %python in the very first line. %python doesn't help, getting the same error. suggest you to look into cython because that's the weave we use I am trying to understand the scope of variables while using weave :) Thanks anyway. As I said earlier -

[sage-support] strange behavior on assigning string with single quotes

2010-05-12 Thread Rajeev
Hi, I am finding a very strange behavior in notebook. Evaluating a = 'hello' gives Traceback (most recent call last): File stdin, line 1, in module File _sage_input_12.py, line 4, in module print _support_.syseval(python, ur\u0027\u0027\u0027a = \u0027hello \u0027\u0027\u0027\u0027,

[sage-support] Re: strange behavior on assigning string with single quotes

2010-05-12 Thread Rajeev
Let me also add that there is no problem if the dropdown menu at the top is set at sage (the default option). On May 12, 4:31 pm, Rajeev rajs2...@gmail.com wrote: Hi, I am finding a very strange behavior in notebook. Evaluating a = 'hello' gives Traceback (most recent call last):  

Re: [sage-support] Re: strange behavior on assigning string with single quotes

2010-05-12 Thread Tim Joseph Dumol
Hi Rajeev, This is a bug in older versions of Sage. Please try downloading the latest version over at: http://sagemath.org/download-linux.html. On Wed, May 12, 2010 at 7:43 PM, Rajeev rajs2...@gmail.com wrote: Let me also add that there is no problem if the dropdown menu at the top is set at

[sage-support] Why isn't Sage showing plots from matplotlib/pylab ?

2010-05-12 Thread zetro
Hello. I'm wondering why these lines doesn't show me any plots: import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.ylabel('some numbers') plt.show() or from pylab import * t = arange(0.0, 2.0, 0.01) s = sin(2*pi*t) plot(t, s, linewidth=1.0) xlabel('time (s)') ylabel('voltage (mV)')

Re: [sage-support] Why isn't Sage showing plots from matplotlib/pylab ?

2010-05-12 Thread Tim Joseph Dumol
Hi, On Wed, May 12, 2010 at 7:58 PM, zetro jej...@utu.fi wrote: Hello. I'm wondering why these lines doesn't show me any plots: import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.ylabel('some numbers') plt.show() or from pylab import * t = arange(0.0, 2.0, 0.01) s = sin(2*pi*t)

[sage-support] linear transformations between vector spaces with named bases?

2010-05-12 Thread John H Palmieri
I have some (hashable) Sage objects, elements of a particular algebra, and I want to view them as the basis of a vector space. Call the objects a, b, c. I think the way to do this in Sage is sage: V = CombinatorialFreeModule(QQ, [a,b,c]) Suppose I have another such vector space: sage: W =

[sage-support] GAP on OSX (sage 4.4.1)

2010-05-12 Thread Jérôme Tremblay
I am unable to run GAP from a network account on my mac. sage: gap('(1,2,3)') raise an exception. sage: gap_console() gives a little more information: Couldn't open saved workspace /Network/Servers/hostname.ca/Users/ tremblayj/.sage//gap/workspace-4762775528093915922 When I use a local

[sage-support] Re: GAP on OSX (sage 4.4.1)

2010-05-12 Thread Jérôme Tremblay
On May 12, 3:48 pm, William Stein wst...@gmail.com wrote: 2010/5/12 Jérôme Tremblay jerome.tremb...@gmail.com: I am unable to run GAP from a network account on my mac. When I use a local account, everything works fine. Can anyone help me? What happens if you do    export

Re: [sage-support] Re: GAP on OSX (sage 4.4.1)

2010-05-12 Thread William Stein
2010/5/12 Jérôme Tremblay jerome.tremb...@gmail.com: On May 12, 3:48 pm, William Stein wst...@gmail.com wrote: 2010/5/12 Jérôme Tremblay jerome.tremb...@gmail.com: I am unable to run GAP from a network account on my mac. When I use a local account, everything works fine. Can anyone help