[sage-support] Re: NumPy Array with generator

2012-12-31 Thread Javier López Peña
You can create a numpy array from a list with numpy.array([cos(x) for x in range(x0, xend, h)]) or if you want to avoid using python lists at al costs, you can do numpy.cos(arrange(x0, xend, h)) "arange" is the numpy equivalent to range, creating an array instead of a list, and then you can u

[sage-support] Re: Sage versus Excel (spreadsheets in general): Are my arguments correct and complete?

2013-01-20 Thread Javier López Peña
On Sunday, January 20, 2013 6:27:16 AM UTC, Dima Pasechnik wrote: > For serious statistics work, one can just use R (which is distributed > with Sage, by the way). http://www.r-project.org/ > Or if you want to keep things pythonic just install the python data analysis library with easy_instal

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Javier López Peña
Hi Simon, it seems to be a bug in Pari, the whole computation ends up calling gflllgram(D._pari_(),1) which doesn't end. Constructing the same matrix directly in pari and calling the function there also doesn't end. I have tried changing the values for the flag and same behavior happens with

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Javier López Peña
Hi Volker, I think lllgramint() is deprecated, we should call gflllgram(D,1) instead. The bug remains the same though. Cheers, J On Monday, January 21, 2013 1:41:35 PM UTC, Volker Braun wrote: > > > > On Wednesday, December 19, 2012 11:07:03 PM UTC, William wrote: >> >> > sage: D=Matrix(IntegerM

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Javier López Peña
ri.devel/2480 > > > On Monday, January 21, 2013 1:48:22 PM UTC, Javier López Peña wrote: >> >> Hi Volker, >> >> I think lllgramint() is deprecated, we should call gflllgram(D,1) instead. >> The bug remains the same though. >> >> Cheers, >> J

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Javier López Peña
On Monday, January 21, 2013 3:28:29 PM UTC, Simon King wrote: > OK, then we should at least fix the documentation of LLL_gram. > Our LLL_gram does this: if self._nrows != self._ncols: raise ArithmeticError("self must be a square matrix") n = self.nrows() # maybe sho

Re: [sage-support] Public worksheets

2012-07-25 Thread Javier López Peña
On Wednesday, July 25, 2012 1:20:24 AM UTC+1, William wrote: > > Somebody needs to write Python code that takes an input "html" and > outputs "definitely safe html", then run it on all published > worksheets, and integrate it with the notebook. > There is a python html sanitizer in lxml [1] wit

Re: [sage-support] Public worksheets

2012-07-25 Thread Javier López Peña
On Wednesday, July 25, 2012 4:11:28 PM UTC+1, Volker Braun wrote: > > Is it? > > > The html5lib sanitizer seems to handle that graciously: In [18]: import html5lib In [19]: from html5lib import sanitizer In [20]: p = html5lib.HTMLParser(toke