dvance for any help.
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
was *autogenerated* from the file temp.sage.
from sage.all_cmdline import * # import sage library
_sage_const_5 = Integer(5); _sage_const_4 = Integer(4)
var('x,y')
__tmp__=var("x,y"); f = symbolic_expression(x*y).function(x,y)
print f(_sage_const_5 ,_sage_const_4 )
I think you can n
= next_prime(ZZ.random_element(2^(100-1),2^100))
print P
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
On Thu, Sep 15, 2011 at 3:24 PM, Rajeev Singh wrote:
> On Thu, Sep 15, 2011 at 12:07 PM, Robert Bradshaw
> wrote:
>> On Wed, Sep 14, 2011 at 2:31 AM, Rajeev Singh wrote:
>>> Hi,
>>>
>>> The following examples compiles from the notebook
>>>
On Thu, Sep 15, 2011 at 7:10 PM, kcrisman wrote:
>
>
> On Sep 15, 9:08 am, Dan Drake wrote:
>> This is strange:
>>
>> x, y =var('x y')
>> plot3d(sqrt(x^2+y^2)*sin(1/sqrt(x^2+y^2)), (x,-1/2, 1/2), (y, -1/2, 1/2),
>> adaptive=True)
>>
>> fails with "ValueError: cannot convert float NaN to integer"
t;> for i in range(10):
... os.system('echo a = %d > %d.sage' %(i,i)) # generating files
0.sage, 1.sage, etc
...
>>> for i in range(10):
... load('%d.sage' %i)
... print a
This gives the expected output. By the way I don't see your filename
changing i
On Thu, Sep 15, 2011 at 6:23 PM, Rajeev Singh wrote:
> On Thu, Sep 15, 2011 at 4:56 PM, Andrew Francis wrote:
>> Hi all,
>>
>> I'm new to this group; thanks for having me.
>>
>> I have generated a large number of text files (several lots of 81
>> fi
On Thu, Sep 15, 2011 at 12:07 PM, Robert Bradshaw
wrote:
> On Wed, Sep 14, 2011 at 2:31 AM, Rajeev Singh wrote:
>> Hi,
>>
>> The following examples compiles from the notebook
>>
>> %cython
>> cimport sage.gsl.ode
>> import sage.gsl.ode
>
On Wed, Sep 14, 2011 at 3:01 PM, Rajeev Singh wrote:
> Hi,
>
> The following examples compiles from the notebook
>
> %cython
> cimport sage.gsl.ode
> import sage.gsl.ode
> include 'gsl.pxi'
>
> cdef class van_der_pol(sage.gsl.ode.ode_system):
> cdef
", ["vander.pyx"],
include_dirs = ['/home/rajeev/bin/sage/devel/sage-main/sage/gsl/'])
setup(ext_modules=[ext],
cmdclass = {'build_ext': build_ext})
I get the following error
ates = [0, 5]
vthresh = solve([eq1], vnode)[0].rhs()
for i in range(2):
vcc = out_states[i]
print '%4s: %.4f'%(vcc, vthresh.substitute(vcc=vcc).n())
output is -
0: 2.4877
5: 2.5123
I have done very small changes in your code. Hope it helps.
Rajeev
--
To post to this grou
On Wed, Aug 10, 2011 at 6:48 PM, Rajeev Singh wrote:
> Hi,
> I was trying out the codes discussed
> at
http://technicaldiscovery.blogspot.com/2011/07/speeding-up-python-again.html
> Here is a summary of my results -
> Computer: Desktopimsc9arav
k
call DGESV(n, 1, A, n, pivot, b, n, ok)
end
'''
fortran(code)
Although apart from showing some warning it does generate a .so file.
I am using Sage 4.6.2 compiled from source on Debian squeeze. Can someone
suggest how to get it working?
Rajeev
--
To post to this group, send ema
TypeError: arg is not a Python function
If I define func1 outside the cython cell then everything works fine. This
is just a toy problem but captures the behavior I encountered. I hope
someone can explain.
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe
On Sat, Jul 30, 2011 at 1:42 PM, Rajeev Singh wrote:
> Hi,
>
> I have a script (say a.py) which uses a function written in fortran 90.
> Within the script I give the command to compile using -
>
> os.system('f2py -c PD_evolve.f90 -m PD_evolve')
>
> It work
f I use -
sage -python a.py
and gives an error while compiling. The last lines of error message are -
/usr/bin/gfortran -Wall
/tmp/tmpBTbBKB/tmp/tmpBTbBKB/src.linux-i686-2.6/PD_evolvemodule.o
/tmp/tmpBTbBKB/tmp/tmpBTbBKB/src.linux-i686-2.6/fortranobject.o
/tmp/tmpBTbBKB/PD_evolve.o -L/home/rajeev/bin
legroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>
You can use sympy as -
>>> import sympy
>>> sympy.integrate(sympy.DiracDelta(x), (x,-1,1))
1
Rajeev
--
To post to this
googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>
Hi,
sage: var('x1, x2, x3')
(x1, x2, x3)
sage: x = vector([x1,x2,x3])
sage: f = lambda x: sum([ii*ii for ii in x])
sage: f(x)
x1^2 + x2^2 + x
Hi,
One way using pylab is following -
sage: import pylab as plt
sage: x = plt.array([2^ii for ii in range(10)])
sage: y = x^2
sage: plt.loglog(x, y, '.')
[]
sage: plt.savefig('/home/rajeev/a.png')
Hope it helps.
Rajeev
--
To post to this group, send email to sage-support
On Thu, May 26, 2011 at 10:26 PM, Mel wrote:
> Do I need to download/load something before I can import the ellipse
> module?
>
> When I type
>from sage.plot.ellipse import Ellipse
> I get "ImportError: No module named ellipse"
>
> Thanks!
>
> --
> To post to this group, send email to sage-su
On Wed, May 25, 2011 at 11:55 AM, Simon King wrote:
> Hi Rajeev,
>
> On 25 Mai, 06:14, Rajeev Singh wrote:
> > sage: R. = FreeAlgebra(QQ, 2)
> >
> > > sage: p = a*(a+2*b)
> > > sage: list(p)
> > > [(2, a*b), (1, a^2)]
> >
> > is ther
+ (1 +
y⋅x)⋅y
> Actually, it looks like if you are using SymPy 0.6.7, there is a bug that
makes this return a wrong result:
For people using sympy in sage, this last point seems important. I actually
checked and we use SymPy 0.6.4
Rajeev
--
To post to this group, send email to sage-suppo
Hi,
I think my other question got buried in the first one, so here it is again.
If I have -
sage: R. = FreeAlgebra(QQ, 2)
sage: a*(a+b)
a^2 + a*b
Is there a simple way to get a*a instead of a^2 ?
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from
= np.vectorize(y)
this fails -
sage: y(x)
---
ValueErrorTraceback (most recent call last)
while this works -
sage: y_vec(x)
array([ 2, 4, 9, 16])
hope it helps.
Rajeev
--
To po
job done.
Thanks in advance.
Regards,
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http
Hi,
I was trying to work out the first example given in
http://wiki.cython.org/WrappingNumpy
in sage notebook, but got an error saying
arrayobject.h not found. How do I get this example working?
Best wishes,
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To
>
> Can you try doing
>
> sage: preparser(False)
>
sage: preparser(False)
sage: from layered_ising_mc import layered_ising_mc
sage: a = layered_ising_mc(n=16, J_p=20, h=19.94, beta=0.5)
sage: a.set_initial_condition()
sage: time data = a.monte_carlo(1000); a.check_consistency()
CPU times: user 40.5
)
sage: a.set_initial_condition()
sage: time data = a.monte_carlo(1000); a.check_consistency()
CPU times: user 191.94 s, sys: 0.11 s, total: 192.04 s
Wall time: 194.03 s
I was surprised that the difference is a factor of 10. I hope I am not
comparing apples to oranges.
Best wishes,
Rajeev
--
To post
Hi,
I think following is a bug -
sage: from scipy import sparse
sage: a = sparse.lil_matrix((10,10))
sage: a[1,2] = 1
---
ValueErrorTraceback (most recent call
last)
/home/rajeev/programs
Hi,
I was trying to run a spyx file but got the following error
11:25:23 $ sage prime_pattern1.spyx < input
Traceback (most recent call last):
File "/home/rajeev/bin/sage/local/bin/sage-sagex", line 5, in
from sage.misc.interpreter import load_sagex
ImportError: canno
html('There is no solution to $$%s x=%s$$'%(latex(A),
latex(v)))
Rajeev
On Tue, May 18, 2010 at 1:50 PM, ma...@mendelu.cz wrote:
> Dear support, this code is from interact help:
>
> sage: @interact
> ... def _(A=matrix(QQ,3,3,range(9)), v=matrix(QQ,3,1,range(3))):
>
> Is there any way to get only one plot in one figure?
Yes, use plt.figure().
plt.plot( ... )
plt.savefig('a.png')
plt.figure()
plt.plot( ...)
plt.savefig('b.png') # you can actually give the same name if you are doing
it in different cells
Rajeev
On Fri, May 14,
^
SyntaxError: invalid syntax
I am using version 4.4.1. I couldn't find a discussion about it
recently. Is someone else also getting the same error?
Best wishes,
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
s
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 wrote:
> Hi,
>
> I am finding a very strange behavior in notebook. Evaluating
>
> a = 'hello'
>
> gives
>
> Traceb
u0027\u0027\u0027, \u0027/home/rajeev/sage_notebook/
sage_notebook.sagenb/home/admin/32/cells/25\u0027)
File "", line 1
print _support_.syseval(python, ur'''a = 'hello'''', '/home/rajeev/
sage_notebook/sage_notebook.sagenb/home/admin/32/cell
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 -
an this code in sage notebook, I got the following error
Traceback (most recent call last):print a, b
File "/home/rajeev/bin/sage-4.2/local/lib/python2.6/site-packages/
scipy/weave/inline_tools.py", line 321, in inline
results = attempt_function_call(code,local_dict,global_dict
Thanks Jason,
But the color assigned is random. I wonder if it is possible to assign
it systematically (like image in matplotlib) and possibly with a
colorbar.
Rajeev
On Apr 27, 7:28 pm, Jason Grout wrote:
> On 04/27/2010 07:32 AM, Rajeev wrote:
>
> > Hi,
>
> > I want to
Hi,
I want to plot weighted graphs such that the link-width or color may
have the information of relative weights. Please point the relevant
document page. I couldn't find one.
Best wishes,
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from
will help.
Best wishes,
Rajeev
On Mar 26, 11:06 am, dabu wrote:
> Hi,
> Many thanks. I will try to have a look.
> best,
> Pallab
> On Mar 25, 1:05 pm, Jason Grout wrote:
>
> > On 03/25/2010 10:25 AM, dabu wrote:
>
> > > Hi,
>
> > > I am new
Hi,
There is a cython script for the example given in the gsl document.
The file is examples/gsl/examples/monte.pyx in the sage package.
Looking at this example is quite instructive.
Rajeev
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group
Hi,
SAGE wraps GSL which has monte carlo integration routines. You may
look at the source file gsl_monte.pxi and the gsl document at -
http://www.gnu.org/software/gsl/manual/html_node/Monte-Carlo-Integration.html
Rajeev
On Feb 3, 7:23 pm, ggrafendorfer wrote:
> Hi all,
>
> does any
k using a sparse matrix would be a better thing to do in such
situations?
Rajeev
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support-unsubscr...@googlegroups.com
For m
there in first place!
Thanks again,
Rajeev
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support-unsubscr...@googlegroups.com
For more options, visit this group
/sage
--
| Sage Version 3.4.1, Release Date: 2009-04-21 |
| Type notebook() for the GUI, and license() for information.|
--
/home/rajeev/sage/
45 matches
Mail list logo