Re: [sage-support] random_matrix -- should returned matrix contain zeros?

2015-05-17 Thread Ronald L. Rivest
Thanks for the quick reply! Cheers, Ron On Sunday, May 17, 2015 at 2:05:04 PM UTC-4, William wrote: > > On Sat, May 16, 2015 at 8:17 PM, Ronald L. Rivest > wrote: > > When I type > > random_matrix? > > at the sage notebook, I get documentation that say

[sage-support] random_matrix -- should returned matrix contain zeros?

2015-05-16 Thread Ronald L. Rivest
When I type random_matrix? at the sage notebook, I get documentation that says, for example, that the matrix entries will never be zero. But they are, even in the given example. What does "and never zero" mean here? Thanks, Ron Rivest The distribution keyword set to uniform will limit valu

Re: [sage-support] Problem integrating piecewise linear function (breaks with constant piece)

2011-02-24 Thread Ronald L. Rivest
OK; thanks! Ron Rivest -- 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

[sage-support] Re: braces in output of latex() command

2011-02-23 Thread Ronald L. Rivest
If expr is some sage expression, then latex(expr) has type sage.misc.latex.LatexExpr. Then str(latex(expr)) is a Python string that you can process as you wish with your own string-processing function. For example, S = str(latex(expr)) S = S[1:-1] will drop the first and last charact

Re: [sage-support] Problem integrating piecewise linear function (breaks with constant piece)

2011-02-23 Thread Ronald L. Rivest
Thanks for the feedback and guidance. It definitely seems to be a bug when the piece has constant value zero. Is posting this bug here on this list sufficient to report it so that it will (eventually) get fixed, or is there some other process for doing so that needs to be done next? Thanks, R

[sage-support] Numeric multiple integral of expression not integrable symbolically ?

2011-02-23 Thread Ronald L. Rivest
Let f(x,y) be a function such that integral(f(x,y),y,0,x) doesn't evaluate to anything simpler, such as f(x,y) = (y+1) ^ (y+1) ^ x How can I then compute the (definite) integral of f over the region 0 <= y <= x <= 1 I want a numeric integration, but numerical_integral(numerical_

[sage-support] Problem integrating piecewise linear function (breaks with constant piece)

2011-02-21 Thread Ronald L. Rivest
I am trying to define piecewise linear functions, and then integrate them. But I get an error AttributeError: 'sage.rings.integer.Integer' object has no attribute 'function' when one of the pieces is a constant function. Strangely, the same code works when the function is non-constant. Her