now I have the following error message:

sage: time Xi = relajacion(mat1, bi, 2.0)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call
last)

/home/cesarnda/Documents/SageProg/servicioSocialCienciaTusManos/
<ipython console> in <module>()

/home/cesarnda/Sage/sage-3.0.2-debian32-intelx86-i686-Linux/local/lib/
python2.5/site-packages/IPython/iplib.py in ipmagic(self, arg_s)
    946         else:
    947             magic_args = self.var_expand(magic_args,1)
--> 948             return fn(magic_args)
    949
    950     def ipalias(self,arg_s):

/home/cesarnda/Sage/sage-3.0.2-debian32-intelx86-i686-Linux/local/lib/
python2.5/site-packages/IPython/Magic.py in magic_time(self,
parameter_s)
   1870         else:
   1871             st = clk()
-> 1872             exec code in glob
   1873             end = clk()
   1874             out = None

/home/cesarnda/Documents/SageProg/servicioSocialCienciaTusManos/<timed
exec> in <module>()

/home/cesarnda/Documents/SageProg/servicioSocialCienciaTusManos/
_home_cesarnda_Documents_SageProg_servicioSocialCienciaTusManos_relajacion_spyx_0.pyx
in
_home_cesarnda_Documents_SageProg_servicioSocialCienciaTusManos_relajacion_spyx_0.relajacion
(_home_cesarnda_Documents_SageProg_servicioSocialCienciaTusManos_relajacion_spyx_0.c:
451)()

/home/cesarnda/Documents/SageProg/servicioSocialCienciaTusManos/
matrix0.pyx in sage.matrix.matrix0.Matrix.__setitem__ (sage/matrix/
matrix0.c:3834)()

/home/cesarnda/Documents/SageProg/servicioSocialCienciaTusManos/
matrix0.pyx in sage.matrix.matrix0.Matrix._coerce_element (sage/matrix/
matrix0.c:3974)()

/home/cesarnda/Documents/SageProg/servicioSocialCienciaTusManos/
integer_ring.pyx in sage.rings.integer_ring.IntegerRing_class.__call__
(sage/rings/integer_ring.c:4664)()

TypeError: unable to coerce element to an integer



On Jul 22, 2:14 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 22, 2008 at 9:10 AM, cesarnda <[EMAIL PROTECTED]> wrote:
>
> > I have already written a script that works perfect in Sage
> > (relaxation.py) but when I rename it (relaxation.spyx) to make it
> > faster it doesn't work because I got a message:
> > sage: attach relajacion.spyx
> > Compiling /home/cesarnda/Documents/SageProg/
> > servicioSocialCienciaTusManos/relajacion.spyx...
> > Error compiling cython file:
> > Error converting /home/cesarnda/Documents/SageProg/
> > servicioSocialCienciaTusManos/relajacion.spyx to C:
>
> > Error converting Pyrex file to C:
> > ------------------------------------------------------------
> > ...
>
> >    Xi = zero_matrix(1, variables)
> >                   ^
> > ------------------------------------------------------------
>
> > /home/cesarnda/.sage/temp/cesarnda_laptop/11612/spyx/
> > _home_cesarnda_Documents_SageProg_servicioSocialCienciaTusManos_relajacion_spyx/
> > _home_cesarnda_Documents_SageProg_service_relajacion_spyx_12.pyx:
> > 31:20: undeclared name not builtin: zero_matrix
>
> Do
>
>  from sage.all import zero_matrix
>
> william
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to