Dear Sage developers.

I try to pass values from Sage6.3 to Scilab5.5.1. There is a problem with 
(not so) large values. For example:

sage: data=range(100)

With a just a few values: good!
sage: scilab.set('x',data[0:5])
sage: scilab('x')
    0.    1.    2.    3.    4.

With more values: error!
sage: scilab.set('x',data[0:100])
(Error message below). 

This was repeated with different sizes of vectors, matrices, different 
types (integers, floats, RealNumber). 
Thresholds may be different, between 5 and 20, but the problem remainded.  

Is there a solution to fix it?

Thanks. 

JC Boulet 



---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-15-12b31288c42c> in <module>()
----> 1 scilab.set('x',data[Integer(0):Integer(100)])

/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/scilab.pyc
 
in set(self, var, value)
    307         """
    308         cmd = '%s=%s;'%(var,value)
--> 309         out = self.eval(cmd)
    310         if out.find("error") != -1:
    311             raise TypeError("Error executing code in 
Scilab\nCODE:\n\t%s\nScilab ERROR:\n\t%s"%(cmd, out))

/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/scilab.pyc
 
in eval(self, command, *args, **kwds)
    274             'd  =\n \n    44.'
    275         """
--> 276         s = Expect.eval(self, command, **kwds).replace("\x1b[4l 
\x08\x1b[0m","").strip()
    277         return s
    278 

/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py
 
in eval(self, code, strip, synchronize, locals, allow_use_file, 
split_lines, **kwds)
   1224                 if (split_lines is "nofile" and allow_use_file and
   1225                         self._eval_using_file_cutoff and len(code) 
> self._eval_using_file_cutoff):
-> 1226                     return self._eval_line_using_file(code)
   1227                 elif split_lines:
   1228                     return '\n'.join([self._eval_line(L, 
allow_use_file=allow_use_file, **kwds)

/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py
 
in _eval_line_using_file(self, line, restart_if_needed)
    728                 except RuntimeError as msg:
    729                     raise RuntimeError('%s terminated unexpectedly 
while reading in a large line'%self)
--> 730             if "Input/output error" in msg[0]: # This occurs on 
non-linux machines
    731                 raise RuntimeError('%s terminated unexpectedly 
while reading in a large line'%self)
    732             raise RuntimeError('%s terminated unexpectedly while 
reading in a large line:\n%s'%(self,msg[0]))

IndexError: tuple index out of range
sage: 




-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to