2008/10/22 Timothy Clemans [EMAIL PROTECTED]:
def from_digits(lis):
return ZZ(''.join([str(i) for i in lis[::-1]]))
Or even
sage: n = 150
sage: dig = n.digits()
sage: PolynomialRing(ZZ,'x')(dig)(2)
150
but I agree that this should be a provided function.
NB trac ticket #2796 may soon
On Oct 21, 2008, at 10:17 PM, pong wrote:
Thanks to both Dan and William. However, Dan's result puzzled me.
Aren't they suggested that the for loop is faster?
Here is what I got:
sage: timeit('list(2*vector([random() for j in range(10)]))')
625 loops, best of 3: 332 µs per loop
sage:
In 3.1.4 and 3.2.alpha0 I get very weird behavior in @interact.
First, when a worksheet opens up, there is the usual long and annoying
automatic evaluation of the @interact cells (which I feel is not a
feature, though perhaps not a bug... but I couldn't find where this
was mentioned before in
On Wed, Oct 22, 2008 at 12:58 PM, kcrisman [EMAIL PROTECTED] wrote:
In 3.1.4 and 3.2.alpha0 I get very weird behavior in @interact.
First, when a worksheet opens up, there is the usual long and annoying
automatic evaluation of the @interact cells (which I feel is not a
feature, though
The reference manual shows the following example for the gradient()
function:
sage: x,y = var('x y')
sage: f = x^2+y^2
sage: f.gradient()
(2*x, 2*y)
However, if instead I enter:
sage: x,y,n = var('x y n')
sage: f = x^n+y^n
sage: f.gradient()
(y^n*log(y) + x^n*log(x), n*x^(n - 1), n*y^(n -
Jim Clark wrote:
The reference manual shows the following example for the gradient()
function:
sage: x,y = var('x y')
sage: f = x^2+y^2
sage: f.gradient()
(2*x, 2*y)
However, if instead I enter:
sage: x,y,n = var('x y n')
sage: f = x^n+y^n
sage: f.gradient()
(y^n*log(y) +
Jason Grout wrote:
Jim Clark wrote:
The reference manual shows the following example for the gradient()
function:
sage: x,y = var('x y')
sage: f = x^2+y^2
sage: f.gradient()
(2*x, 2*y)
However, if instead I enter:
sage: x,y,n = var('x y n')
sage: f = x^n+y^n
sage: f.gradient()
The automatic evaluation of all @interact cells is a feature.
Do you wish that this did not occur, and that users had
to explicitly hit shift-enter (or click some button) to fire up
any interact? It would be easy to change the implementation
to have that behavior (in fact, that would be a
On Oct 22, 2008, at 5:28 PM, Jason Grout wrote:
I've posted a patch to http://trac.sagemath.org/sage_trac/ticket/4343
Can you apply the patch and test it out?
Here is the new behavior:
sage: f(x,y) = x^n+y^n
sage: f.gradient()
((x, y) |-- n*x^(n
Jim Clark wrote:
On Oct 22, 2008, at 5:28 PM, Jason Grout wrote:
I've posted a patch to http://trac.sagemath.org/sage_trac/ticket/4343
Can you apply the patch and test it out?
Here is the new behavior:
sage: f(x,y) = x^n+y^n
sage: f.gradient()
On Wed, Oct 22, 2008 at 7:17 PM, Jason Grout
[EMAIL PROTECTED] wrote:
Jim Clark wrote:
On Oct 22, 2008, at 5:28 PM, Jason Grout wrote:
I've posted a patch to http://trac.sagemath.org/sage_trac/ticket/4343
Can you apply the patch and test it out?
Here is the new behavior:
I have noticed similar things as well; sometimes I have to reload to
get interact cells to appear correctly.
The automatic evaluation of interact cells bothers me; I think it
would be better if this was changed. Is it not enough to use #auto? -
William's comments suggest things are more
Marshall Hampton wrote:
I have noticed similar things as well; sometimes I have to reload to
get interact cells to appear correctly.
The automatic evaluation of interact cells bothers me; I think it
would be better if this was changed. Is it not enough to use #auto? -
William's comments
Hi,
I need to do an RQ decomposition (though QR would be a start) for a
matrix with entries in Laurent series ring over a finite field. A
matrix over ZZ and other special rings could be sent to SciPy to do
the decomposition, but Laurent series aren't quite so amenable. If
anyone has some good
14 matches
Mail list logo