[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
you have something to say about that. Alec Mihailovs, PhD (from University of Pennsylvania), teaching math for more than 30 years. -- 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 m

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 8:55 pm, Alec Mihailovs wrote: > Maybe, I still don't understand it right, but it seems as if you are > saying, that the problem is to do a similar thing in cases when the > solution is not unique, producing the list of all the solutions. That > can be done similarl

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 8:10 pm, David Joyner wrote: > Perhaps I don't understand your program, but it appears to not address > the issue. Here is the algorithm, if I understand the question correctly: > > Let I denote the subset of range(n) which represents the erasures. > Let v denote the vector in GF(q)^n w

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 5:28 pm, Alec Mihailovs wrote: > I looked at the C.decode (for C in the original post), and it does > something different - it corrects the errors. Perhaps, the better name > for it would be C.correct ? If that is needed, that could be done as def correct(w,erasures=[],num

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 5:28 pm, Alec Mihailovs wrote: > > Also, perhaps, just simple linsolve can be used (in my decode) if it > exists in Sage and works for overdetermined systems of linear > equations. Yes, I found it - it is called solve_left, and it can be used as follows, def decode

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 5:05 pm, David Joyner wrote: > Do you mean A is the matrix of all n^k codewords, but you remove the > columns corresponding to the erasure positions? I don't know what you > mean by A. I meant the submatrix of G - I used something like that in the decode procedure in another post, jus

[sage-support] Re: Vector solutions, a basic question.

2010-04-16 Thread Alec Mihailovs
On Apr 16, 4:01 pm, Alexander Shyrokov wrote: > I have derived the equation, which looks like this: > ((T - (E -T) *(H.dot(N) - T.dot(N))/(E - T).dot(N) - H) / S) ==  Mp I'll take a look at it later. But in general, if you have a system of linear equations, you can write it in a matrix form A*x=

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 4:16 pm, Alec Mihailovs wrote: > For example, > > m=V.random_element(); m > >                 (2, 1, 0, 0, 1, 2, 0, 1, 0, 0) It should be V=VectorSpace(GF(3),10) before that. Alec -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
(2, 1, 0, 0, 1, 2, 0, 1, 0, 0) decode(w,range(15)) Too many erasures Alec Mihailovs -- 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: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 1:50 pm, Alec Mihailovs wrote: > > Or even more simple -if A is the matrix consisting of all non-erased > columns, use A.transpose()*(A*A.transpose()).inverse() for decoding, > applying it to the non-erased part. And if A*A.transpose() is singular, the same thing, probab

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 1:39 pm, Alec Mihailovs wrote: > simple - find 10 other columns with non-zero determinant of the matrix > constructed from them, and use the inverse of this matrix for > decoding. Or even more simple -if A is the matrix consisting of all non-erased columns, use A.trans

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 16, 10:34 am, David Joyner wrote: > I think you meant to say "If the minimum distance is 9, then, I think, > only vectors with 4 > errors or less can be decoded correctly." I think erasures (where the > error positions are assumed to be known) are more complicated. > In the example of the

[sage-support] Re: Coding theory:erasures

2010-04-16 Thread Alec Mihailovs
On Apr 15, 8:45 am, Andrea Gobbi wrote: > Hi! > I'm using sage for coding theory, and it sems to be great! I have a > linear code like this: > MS = MatrixSpace(GF(3),10,27) > G  = MS([ > [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], > [1,2,0,0,0,0,1,1,2,2,0,0,0,0,1,1,2,2,1,1,1,1,2,2,2,2

[sage-support] Re: Vector solutions, a basic question.

2010-04-15 Thread Alec Mihailovs
For example, let the plane's equation is 2*x+3*y+4*z=5, and the line is given as =. Then the point of their intersection can be found in Sage as follows, var('t'); x,y,z=t-1,2*t-3,2-t plane=2*x+3*y+4*z-5 a=solve(plane,t)[0] [i.subs(a) for i in x,y,z] [1, 1, 0] Alec -- To post t

[sage-support] Re: Yamanouchi words

2010-04-14 Thread Alec Mihailovs
On Apr 14, 12:47 am, Drini wrote: > I'm confused > abouthttp://www.sagemath.org/doc/reference/sage/combinat/yamanouchi.html > it's documentation for 4.3.5 but it's been the same since 4.3.1 > > Is there a class? > functions? > or is it just a random note about those words? The file devel/sage/sa

[sage-support] Re: Degree 120 splitting field

2010-04-14 Thread Alec Mihailovs
On Apr 14, 2:08 pm, Rob Beezer wrote: > Rinse, repeat.  First iteration is below.  By the time I get to degree > 3 the factorizations are taking about 8 hours.  My question: is there > a more efficient way to do this? Divisions are faster than the factorization - divide by (x-a), then by (x-b),

[sage-support] Re: Problems to susbstitute a function

2010-04-12 Thread Alec Mihailovs
On Apr 12, 5:57 pm, Eckhard Kosin wrote: > I think I understand:  After > > expr(x) = sin(x) > > expr is a symbolic expression and can be differentiated and the same > goes for sin after > > sin(x) = sin(x) Yes. And the same thing can be done for other functions. In particular, in your example w

[sage-support] Re: problems with sage and brian simulator

2010-04-12 Thread Alec Mihailovs
On Apr 12, 4:03 pm, Alec Mihailovs wrote: > Also, the show command should be replaced with savefig - something > like in the following example, That could be also done without changing the examples on the brian's webpage, by redefining show() as def show(): from matplotlib.py

[sage-support] Re: problems with sage and brian simulator

2010-04-12 Thread Alec Mihailovs
On Apr 12, 4:32 pm, William Stein wrote: > > You can also just do > > Action -> Restart Worksheet Thank you! Alec -- 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, vis

[sage-support] Re: problems with sage and brian simulator

2010-04-12 Thread Alec Mihailovs
By the way, the easy way to install brian package in Sage from the notebook is to execute the following cell, %sh easy_install brian Then save & quit the worksheet and open it again. Alec -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send

[sage-support] Re: problems with sage and brian simulator

2010-04-12 Thread Alec Mihailovs
On Apr 12, 3:30 pm, Alec Mihailovs wrote: > > import brian_no_units > from brian import * Also, the show command should be replaced with savefig - something like in the following example, from matplotlib.pyplot import savefig eqs = ''' dv/dt = (ge+gi-(v+49*mV))/(20*ms) :

[sage-support] Re: problems with sage and brian simulator

2010-04-12 Thread Alec Mihailovs
On Apr 12, 5:30 am, Uri wrote: > I found another way to solve that problem (which seems more practical > to me). You just have to redefine RealNumber and Integer: > > RealNumber=float > Integer=int You could also disable units - i.e. start brian as import brian_no_units from brian import * Then

[sage-support] Re: multidimensional numerical integration

2010-04-12 Thread Alec Mihailovs
35001e-13) Check it, integral(integral(x+2*y,y,1-x,1+x),x,1,2) 32/3 Alec Mihailovs -- 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, visi

[sage-support] Re: Question about numerical linear algebra.

2010-04-11 Thread Alec Mihailovs
On Apr 11, 1:22 pm, Thierry Dumont wrote: >   -Qusetion: is there some "dictionary", some documentation about how > the scipy functions are "mapped" to sage? and what can be directly used? What can be used can be seen by typing A. and hitting Tab key. The documentation for every method is availa

[sage-support] Re: (1 - i) == -(i + 1) ??

2010-04-11 Thread Alec Mihailovs
On Apr 11, 4:51 pm, Mike Witt wrote: > [m...@vector ~]$ sage > -- > | Sage Version 4.3.1, Release Date: 2010-01-20                       | > | Type notebook() for the GUI, and license() for information.        | >

[sage-support] Re: Question about numerical linear algebra.

2010-04-11 Thread Alec Mihailovs
On Apr 11, 1:22 pm, Thierry Dumont wrote: >   In the preceding examples, if you compare as given by U,Sig,V=A.SVD() > and U given by U,s,Vh=svd(A) they are transposed :-( U is the same, Sig is a diagonal matrix with diagonal entries being elements of vector s, and V is Hermitian transposed to Vh,

[sage-support] Re: points on elliptic curves mod N

2010-04-10 Thread Alec Mihailovs
On Apr 10, 8:27 pm, Robert Bradshaw wrote: > This particular point however seems to have order 3 on both E(GF(67))   > and E(GF(89)). E=EllipticCurve([1,R(1)]) seems to be working, 7*E([0,1]) Traceback (click to the left of this block for traceback) ... ZeroDivisionError: Inverse of 5092 does

[sage-support] Re: Problems to susbstitute a function

2010-04-10 Thread Alec Mihailovs
On Apr 10, 10:37 am, Eckhard Kosin wrote: > > sage: sin.diff() > --- > AttributeError ... There is an interesting way to fix that, sin(x)=sin(x) sin.diff() x |--> cos(x) Alec -- To post to this group, send

[sage-support] Re: Arrangements().list() nice format

2010-04-10 Thread Alec Mihailovs
Another way, sage: set=['adam', 'eva', 'otto', 'emil'] sage: a=Arrangements(set,4).list() sage: for i in zip(a[0:-1:2],a[1:-1:2]): i : (['adam', 'eva', 'otto', 'emil'], ['adam', 'eva', 'emil', 'otto']) (['adam', 'otto', 'eva', 'emil'], ['adam', 'otto', 'emil', 'eva']) (['adam', 'emil', 'eva',

[sage-support] Re: Gap packages

2010-04-10 Thread Alec Mihailovs
lex.SimplicialHomology() [ [ 0 ], [ 1 ] ] gap("SimplicialHomology(SCNot2ConnectedGraphs(7),9)") [ [ 120 ] ] Seems to be working OK. Alec Mihailovs -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+

[sage-support] Re: Arrangements().list() nice format

2010-04-10 Thread Alec Mihailovs
For example, sage: set=['adam', 'eva', 'otto', 'emil'] sage: a=Arrangements(set,4) sage: for x in range(0,a.cardinality(),2): print a[x],a[x+1] : ['adam', 'eva', 'otto', 'emil'] ['adam', 'eva', 'emil', 'otto'] ['adam', 'otto', 'eva', 'emil'] ['adam', 'otto', 'emil', 'eva'] ['adam', 'emil', 'ev

[sage-support] Re: Problems to susbstitute a function

2010-04-10 Thread Alec Mihailovs
; x |--> cos(x) > > but > > sage: sin.diff() > ------- > AttributeError ... Because S is a symbolic function, and sin is not. type(sin) The word 'symbolic' is missing. That, perhaps, can be

[sage-support] Re: Invoking Lisp from within Sage

2010-04-09 Thread Alec Mihailovs
On Apr 10, 1:32 am, Adam Getchell wrote: > Hi all, > > I realize this maybe a bit of an insane question, but I'm looking for a way > to use ecl within sage besides: > > ./sage -ecl For example, lisp("(def x 1)(defun f (x)(+ x 1))(f 2)") 3 Alec Mihailovs --

[sage-support] Re: Eigenvectors of a matrix

2010-04-09 Thread Alec Mihailovs
For M, you could do something like M=matrix([[1,1+i],[1-i,-1]])/sqrt(3) html.table(maxima(M).eigenvectors().sage()) or html.table([[r,(M-matrix(2,2,r)).right_kernel().basis_matrix()] for r in M.eigenvalues()]) And numerically the eigenvectors could be found as matrix(M.numpy(dtype=complex)).ei

[sage-support] Re: Inverses of Large Sparse Matrices

2010-04-09 Thread Alec Mihailovs
On Apr 9, 8:59 pm, William Stein wrote: > A 5000x5000 matrix just isn't really that big, IMHO... Actially, thinking about that, who knows what size its elements could be, if they are rational... They may be really big. Alec -- To post to this group, send email to sage-support@googlegroups.com

[sage-support] Re: Inverses of Large Sparse Matrices

2010-04-09 Thread Alec Mihailovs
On Apr 9, 8:59 pm, William Stein wrote: > A 5000x5000 matrix just isn't really that big, IMHO... That's true - should work in just few seconds - I meant REALLY big matrices - actually, sometimes such a thing should work faster even for not that big matrices - in case if the virtual memory locate

[sage-support] Re: Inverses of Large Sparse Matrices

2010-04-09 Thread Alec Mihailovs
On Apr 9, 1:53 pm, Leo Maloney wrote: > I'm trying to compute the inverse of a 5000 x 5000 sparse matrix.  I'm > getting an EOF error after it runs for about 5 hours, and then it > states that sage is trying to access unallocated memory.  Is there a > way I can increase the memory for this computa

[sage-support] Re: Problems to susbstitute a function

2010-04-09 Thread Alec Mihailovs
sqrt(R_b(t)^2-R_u^2)) 2*sin(psi(t))*cos(psi(t))*D[0](R_b)(t) - sin(psi(t))*R_b(t)*D[0](R_b)(t)/sqrt(-R_u^2 + R_b(t)^2) - (2*sin(psi(t))^2*R_b(t) - R_b(t))*D[0](psi)(t) Alec Mihailovs -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this gro

[sage-support] Re: standard deviations in sage

2010-04-07 Thread Alec Mihailovs
On Apr 7, 12:56 pm, Marshall Hampton wrote: > with RDF!  I think this is because many operations over RDF get sent > to numpy and scipy, and the conversions aren't defined for RR.  This > seems like a bug to me. By the way, % also doesn't work with 2 RDFnumbers sage: RDF(3)%RDF(5) Traceback (c

[sage-support] Re: Can't solve equation with square roots...

2010-04-06 Thread Alec Mihailovs
On Apr 6, 9:09 am, Danread5 wrote: > > sage: d = sqrt(x^2 + 5^2) > sage: D = sqrt((20-x)^2 + 10^2) > sage: T = d + D; T > sqrt(x^2 + 25) + sqrt((x - 20)^2 + 100) > sage: diff(T, x) > (x - 20)/sqrt((x - 20)^2 + 100) + x/sqrt(x^2 + 25) > sage: solve((x - 20)/sqrt((x - 20)^2 + 100) + x/sqrt(x^2 + 25)

[sage-support] Re: Difference between sage and pyhton calculations

2010-04-05 Thread Alec Mihailovs
On Apr 6, 2:00 am, Robert Bradshaw wrote: > I would be in favor of following Python's conventions here--they at   > least seem more natural to me (after all, % is related to "floor   > division" not "round division." :) Also, currently 2==2., 3==3., but 2%3 is 2 and 2.%3. is -1.00, a

[sage-support] Re: Difference between sage and pyhton calculations

2010-04-05 Thread Alec Mihailovs
Or use Python floats, sage: float(6e-6) % float(10e-6) 6.0002e-06 In both cases the result is a Python float. To make it a Sage's real number, one can use RR, sage: RR(_) 6.00e-6 Alec Mihailovs -- To post to this group, send email to sage-support@googlegroups.com To un

[sage-support] Re: Interface to openssl hash functions?

2010-04-05 Thread Alec Mihailovs
d.p1 sage -f python-2.6.4.p7 Alec Mihailovs -- 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-suppo

[sage-support] Re: nested "for" statements?

2010-04-05 Thread Alec Mihailovs
On Apr 5, 8:26 pm, Dana Ernst wrote: > Wow, thanks for all the feedback.  I learned a lot today! > > On Apr 5, 2010, at 5:31 PM, Alec Mihailovs wrote: > > u=[n for n in U if gcd(n,40)==1] By the way, one has to be careful using some of the methods of U. In partic

[sage-support] Re: nested "for" statements?

2010-04-05 Thread Alec Mihailovs
On Apr 5, 5:11 pm, Alec Mihailovs wrote: > u=filter(lambda n: gcd(n,40)==1, U) Also, that can be done as u=[n for n in U if gcd(n,40)==1] Alec -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsub

[sage-support] Re: nested "for" statements?

2010-04-05 Thread Alec Mihailovs
On Apr 5, 5:11 pm, Alec Mihailovs wrote: > html.table([r]+[map(lambda j: k^j, r) for k in u], header=True) Or even more simple, html.table([r]+[[k^j for j in r] for k in u],header=True) Alec -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this gr

[sage-support] Re: nested "for" statements?

2010-04-05 Thread Alec Mihailovs
On Apr 5, 4:48 pm, Harald Schilly wrote: > you can also format it as an html table, read the output of > html.table? for more information ;) That can be done as U=Integers(40) u=filter(lambda n: gcd(n,40)==1, U) r=range(1,len(u)) html.table([r]+[map(lambda j: k^j, r) for k in u], header=True)

[sage-support] Re: derivative instance

2010-04-05 Thread Alec Mihailovs
A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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 mo

[sage-support] Re: Print only outputs?

2010-04-03 Thread Alec Mihailovs
On Apr 2, 11:47 pm, William Stein wrote: > That's pretty clever!   Thank you! > Is amazing how flexible the notebook is, since > it uses HTML instead of ReST...  (yes, I know, it's flexible enough to > support cross-site scripting attacks too). That's the same as with other CAS. In particular

[sage-support] Re: derivative instance

2010-04-03 Thread Alec Mihailovs
ives false, assuming f is not a derivative itself. One can do the following, for example, def is_diff(expr): try: return isinstance(expr.operator(), sage.symbolic.operators.FDerivativeOperator) except (AttributeError): return False Alec Mihailovs -- To post to this group, se

[sage-support] Re: List of "standard functions"?

2010-04-03 Thread Alec Mihailovs
On Apr 3, 11:55 am, Simon King wrote: >   sage: F = [f for f in globals().values() if callable(f)] I would write it as filter(callable, globals().values()) Alec -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+u

[sage-support] Re: Print only outputs?

2010-04-02 Thread Alec Mihailovs
it works with the current notebook. >   It doesn't affect the Print link, though. If one executes the following in a cell: html('div.cell_input_print {display: none}') and then clicks Print (at the lhs of the Worksheet button at the top), all input cells will be hidden in the hew

[sage-support] Re: Is there an efficient method of producing indexed variables?

2010-04-02 Thread Alec Mihailovs
On Apr 2, 1:45 pm, Franco Saliola wrote: > sage: a = SymbolicVariables('a') > ... > Here is a very simple implementation of SymbolicVariables. > >     class SymbolicVariables(SageObject): >         def __init__(self, prefix='x'): >             self._prefix = prefix >         def __getitem__(self,

[sage-support] Re: Seeking Cython-101 lesson

2010-03-22 Thread Alec Mihailovs
t paid at least $200/hour or more, and will try to avoid any "interesting conversation" meaning that we have to listen to that, at any cost. Alec Mihailovs -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sa

[sage-support] Re: Seeking Cython-101 lesson

2010-03-21 Thread Alec Mihailovs
eshmen, and 101 is usually a general education course taken by non-majors. Say Biology 101 means a general education biology course for non-biologists, and Math 101 is a general education course for non-mathematicians, as well as for people not taking any other math courses. Alec Mihailovs -- To p

[sage-support] Re: sage on slitaz linux?

2010-03-20 Thread Alec Mihailovs
, I guess. It is rather small, contains Sage 4.3.1 on Puppy Linux, and is available from http://mira.sunsite.utk.edu/sagemath/livecd/index.html as well on other mirrors. Alec Mihailovs -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email

[sage-support] Re: atan2 throws "divide by zero"

2010-03-19 Thread Alec Mihailovs
Also, simplification might be improved. In particular, sage: atan(sin(1)/cos(1)).full_simplify() arctan(sin(1)/cos(1)) while atan(tan(1)).simplify() 1 Alec Mihailovs -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage

[sage-support] Re: help with chanin dirivatives

2010-03-18 Thread Alec Mihailovs
q=diff(eta(x,t),x)==k(bx,bt) f(eta(x,t),bx,bt).diff(x,2).expand().subs(eq).subs(diff(eq,x)) delta^2*D[1, 1](f)(eta(x, t), delta*x, delta^2*t) + 2*delta*k(delta*x, delta^2*t)*D[0, 1](f)(eta(x, t), delta*x, delta^2*t) + delta*D[0](f)(eta(x, t), delta*x, delta^2*t)*D[0](k)(delta*x, delta^2*

[sage-support] Re: atan2 throws "divide by zero"

2010-03-18 Thread Alec Mihailovs
On Mar 17, 8:38 pm, G B wrote: > atan2(-pi,0) -->  RuntimeError: power::eval(): division by zero > > Any ideas how to get around this? A simple workaround is sage: from sympy import atan2 sage: atan2(-pi,0) -pi/2 Alec Mihaiovs -- To post to this group, send email to sage-support@googlegroup

[sage-support] Re: atan2 throws "divide by zero"

2010-03-17 Thread Alec Mihailovs
le it looks correct, it is not the answer that n should give. Alec Mihailovs -- 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

[sage-support] Re: Entering matrices whose elements are functions of row/column indices?

2010-03-17 Thread Alec Mihailovs
On Mar 16, 10:47 pm, Alec Mihailovs wrote: > By the way, vector doesn't work with integer numpy arrays, > > from numpy import array > vector(array([1,2])) > > Traceback (most recent call last): That shouldn't be too hard to implement - in particular, the following wor

[sage-support] Re: Syntax highlight in SAGE Calculator?

2010-03-17 Thread Alec Mihailovs
vector? vector?? Alec Mihailovs -- 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: Entering matrices whose elements are functions of row/column indices?

2010-03-16 Thread Alec Mihailovs
e "", line 1, in File "free_module_element.pyx", line 309, in sage.modules.free_module_element.vector (sage/modules/ free_module_element.c:3172) TypeError: unsupported operand type(s) for ** or pow(): 'NoneType' and 'int' Alec Mihailovs -- To post to this group, sen

[sage-support] Re: Entering matrices whose elements are functions of row/column indices?

2010-03-16 Thread Alec Mihailovs
On Mar 16, 3:57 pm, Mike Hansen wrote: > On Tue, Mar 16, 2010 at 12:38 PM, Alec Mihailovs > > wrote: > > Will it work as matrix(5,f) as well, or only as matrix(5,5,f) ? > > It now works with both. > > --Mike That's great! What about vector(3,f), f.vector(3),

[sage-support] Re: Entering matrices whose elements are functions of row/column indices?

2010-03-16 Thread Alec Mihailovs
Mike Will it work as matrix(5,f) as well, or only as matrix(5,5,f) ? Alec Mihailovs -- 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://grou

[sage-support] Re: Entering matrices whose elements are functions of row/column indices?

2010-03-15 Thread Alec Mihailovs
On Mar 15, 3:48 am, Alec Mihailovs wrote: > That seems to be a bug introduced in Sage, not in numpy, > > sage: fromfunction(lambda i,j:i-j+3,(1,1),dtype=int) > > array([[3]]) > > sage: matrix(_) > > [0 0 0] > [0 0 0] > [0 0 0] Yes, and that happens with other nu

[sage-support] Re: BoxPlot in Sage: how do we plot?

2010-03-15 Thread Alec Mihailovs
seems to be built without the png support in Sage. Here is a simple working example of a boxplot using matplotlib: from pylab import boxplot,savefig b=boxplot(range(10)) savefig("sage1.png") The original data list can be substituted in place of range(10) above. Alec Mihailovs -- To po

[sage-support] Re: Could someone help me.....

2010-03-15 Thread Alec Mihailovs
py.random.random_integers.html ) from numpy.random import random_integers dsums = random_integers(1, 6, 1) + random_integers(1, 6, 1) from matplotlib import pyplot counts = pyplot.hist(dsums, 11)[0]; counts array([ 279, 569, 845, 1072, 1398, 1683, 1355, 1106, 842, 576, 275]) pyplot.s

[sage-support] Re: Entering matrices whose elements are functions of row/column indices?

2010-03-15 Thread Alec Mihailovs
On Mar 15, 3:39 am, Alec Mihailovs wrote: > The second problem is that something strange happens for 1x1 matrices, > with any dtype, > > matrix(fromfunction(lambda i,j:i-j,(1,1),dtype=int)) > > [] > > matrix(fromfunction(lambda i,j:i-j+3,(1,1),dtype=int)) > > [0

[sage-support] Re: Entering matrices whose elements are functions of row/column indices?

2010-03-15 Thread Alec Mihailovs
On Mar 14, 6:15 pm, Alec Mihailovs wrote: > That could be also done as > > from numpy import fromfunction > > matrix(fromfunction(lambda i,j:i-j, (6,6), dtype=int)) > > [ 0 -1 -2 -3 -4 -5] > [ 1  0 -1 -2 -3 -4] > [ 2  1  0 -1 -2 -3] > [ 3  2  1  0 -1 -2] > [ 4  3

[sage-support] Re: Entering matrices whose elements are functions of row/column indices?

2010-03-14 Thread Alec Mihailovs
Integer Ring Alec Mihailovs -- 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: shift-return, shift-enter, click-mouse-on-evaluate. on evaluating a cell in a notebook

2009-04-21 Thread Alec Mihailovs
In Windows, such things, as well as any other key (and mouse) remapping can be done using an autohotkey script, http://www.autohotkey.com/ Alec Mihailovs --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe

[sage-support] Re: Maple in Sage on Mac

2009-01-17 Thread Alec Mihailovs
lpful, http://www.mapleprimes.com/blog/paul/usingopenmaplec Alec Mihailovs --~--~-~--~~~---~--~~ 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 op

[sage-support] Re: NVIDIA Tesla

2008-11-23 Thread Alec Mihailovs
Thank you! > http://groups.google.com/group/mpir-devel/t/df88735e6d4e678c I should search the group before posting. Alec --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAI

[sage-support] NVIDIA Tesla

2008-11-23 Thread Alec Mihailovs
Is it possible to run SAGE on NVIDIA Tesla (with 4 teraflops)? http://www.nvidia.com/object/personal_supercomputing.html http://tech.slashdot.org/article.pl?sid=08/11/23/068234&from=rss Alec --~--~-~--~~~---~--~~ To post to this group, send email to sage-support

[sage-support] Re: square of an inequality

2008-08-25 Thread Alec Mihailovs
From: "Stan Schymanski" <[EMAIL PROTECTED]> > I think it would be very nice to include a solve algorithm for > inequalities. To my knowledge, Mathematica does not do this, either. > Or at least, I did not find out how to do it in Mathematica after 4 > years of use. For example, In[1]:= Reduce[

[sage-support] Re: Hypergeometric sum

2008-08-23 Thread Alec Mihailovs
Ondrej and William, Thank you, it's nice to know about that. Alec --~--~-~--~~~---~--~~ 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

[sage-support] Re: Hypergeometric sum

2008-08-23 Thread Alec Mihailovs
> What is your point? Actually, I meant that more about Maplesoft. Sage support is usually good in this group, just wasn't very good in this thread. Alec --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe fr

[sage-support] Re: Hypergeometric sum

2008-08-23 Thread Alec Mihailovs
>> I came across this example in a recent thread in Maple newsgroup. > > Here is the link, > > http://groups.google.com/group/comp.soft-sys.math.maple/browse_thread/thread/65248f258f5522ad?hl=en# > > Another link, to Mathematica newsgroup, > > http://groups.google.com/group/comp.soft-sys.math.math

[sage-support] Re: square of an inequality

2008-08-23 Thread Alec Mihailovs
>> By the way, I just looked at Wester's article (briefly), and it seems as >> if >> he missed inequalities. Such things, as, say, x+y<=3, x>=0, y>=0 for >> integer >> x and y, should be a part of the standard test, I think. [...] >> Can SAGE do that? I meant to solve. The answer should be eith

[sage-support] Re: Hypergeometric sum

2008-08-21 Thread Alec Mihailovs
> I came across this example in a recent thread in Maple newsgroup. Here is the link, http://groups.google.com/group/comp.soft-sys.math.maple/browse_thread/thread/65248f258f5522ad?hl=en# Another link, to Mathematica newsgroup, http://groups.google.com/group/comp.soft-sys.math.mathematica/brows

[sage-support] Re: Hypergeometric sum

2008-08-21 Thread Alec Mihailovs
From: "Burcin Erocal" <[EMAIL PROTECTED]> > > it doesn't give an answer. This means that your expression doesn't have > a hypergeometric closed form in the sense of A=B, p. 143 [1]: > > http://www.cis.upenn.edu/~wilf/AeqB.html Is this a joke? After converting binomial coefficients to Pochhammer

[sage-support] Hypergeometric sum

2008-08-21 Thread Alec Mihailovs
Both Maple and Mathematica give wrong answers to the following sum, Sum[Binomial[n, k]/Binomial[2 n, k]/k! (2 x)^k, {k, 0, n}] I tried to find a way to calculate it in SAGE, but couldn't find symbolic sums in the documentation. Is Maxima supposed to be used directly? Alec --~--~-~--

[sage-support] Re: square of an inequality

2008-08-20 Thread Alec Mihailovs
> sage: eqn.lhs()^2 bv^2 < (bv^2*rwat + av*lwat)/rwat > > > Perhaps, there is no need to implement it after all. There is a definite need, and it shouldn't be too complicated. The thing that should be implemented is : if a0, then a*c=0, y>=0 for integer x and y, should be a part of the standar

[sage-support] Re: polymake

2008-08-18 Thread Alec Mihailovs
Michael, > I have an updates spkg that fixes those issues once and for all. I > need to polish it and have it reviewed so that I can push it into the > repo. Thank you, Alec --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.co

[sage-support] polymake

2008-08-18 Thread Alec Mihailovs
I just tried to install polymake (an optional package) in Sage 3.1.1 and it failed because it tried to find cddlib-094b.p1 while the next patch, cddlib-094b.p2 is included in standard packages. Alec --~--~-~--~~~---~--~~ To post to this group, send email to sa

[sage-support] Re: Spam bots

2008-07-15 Thread Alec Mihailovs
> Disabled automated account creation and turn on the text captcha. Just > because a spam bot uses a category X it has nothing to do with X. It > seems kind of counter productive to be associated with the culprit in > the first place. If *I* were to write a Sage spambot I would have it > claim to

[sage-support] Re: Spam bots

2008-07-15 Thread Alec Mihailovs
> I guess in the end I'm not sure what you wanted to accomplish with > this thread. Are you saying that there is an individual associated to > the Sage project that is spamming your wiki? Or that there is code in > Sage designed to spam your wiki? Or ...? First, I wanted to know if there were o

[sage-support] Re: Spam bots

2008-07-15 Thread Alec Mihailovs
> My guess is that the spam bot wanted to assign its page to a category, > and it can easily find the already existing categories on your wiki > from http://mapleadvisor.com/cgi-bin/moin.cgi/CategoryCategory That could happen, with probability 20%. Alec --~--~-~--~~~---

[sage-support] Re: Spam bots

2008-07-15 Thread Alec Mihailovs
> First, I didn't have CategorySage there. Correction - Just found out that I had it. > Second, look at the added text - CategorySage was added as a part of the > spam. Still, the spam text contained it. I don't think that a bot was searching for the pages in the wiki and randomly chose that o

[sage-support] Re: Spam bots

2008-07-15 Thread Alec Mihailovs
>> http://mapleadvisor.com/cgi-bin/moin.cgi/FrontPage?action=diff&rev1=3&rev2=4 > > I'm not sure what you mean by Sage is being used to create spam bots. > Since you already had a CategorySage on your wiki, I don't see any > evidence that this is related to Sage in any way. First, I didn't have C

[sage-support] Spam bots

2008-07-15 Thread Alec Mihailovs
Sage seems to be used for creating spam bots. In particular, the FrontPage in Maple Wiki was corrupted yesterday from 193.53.87.109 with spam ending with CategorySage, see http://mapleadvisor.com/cgi-bin/moin.cgi/FrontPage?action=diff&rev1=3&rev2=4 Alec M

[sage-support] Re: Maple wiki

2008-07-03 Thread Alec Mihailovs
> I'd like to copy a few pages (and from cython wiki, too). The one that I > originally meant, was > http://wiki.sagemath.org/A_short_introduction_to_SAGE Just did it, http://mapleadvisor.com/cgi-bin/moin.cgi/A_short_introduction_to_SAGE It took more time and effort than I expected though, bec

[sage-support] Re: Maple wiki

2008-07-03 Thread Alec Mihailovs
>> There are few versions of the CC licensing though. Is it just BY? Or >> there >> are some other additions to it? > > I don't actually know for sure off the top of my head. Let me know > what page(s) you want to copy... Oh, I've just found it - it is linked to BY-SA (so I should add the licen

[sage-support] Re: Maple wiki

2008-07-03 Thread Alec Mihailovs
William, > We state on the front page of the Sage wiki: "By making an explicit > contribution to the Sage wiki (or the Sage documentation), one > certifies that one's contribution is licensed under the Creative > Commons 3.0 license." So I think you could copy something > from the Sage wiki to

[sage-support] Re: Maple wiki

2008-07-03 Thread Alec Mihailovs
From: "Harald Schilly" <[EMAIL PROTECTED]> > Well, there is already a http://wiki.sagemath.org/ - unless there are > special reasons, sage+wiki stuff should go there. and about postings, > if there is anyone who would like to maintain a faq-support collection > of postings is welcome ;) Well, th

[sage-support] Maple wiki

2008-07-03 Thread Alec Mihailovs
nicely (red and bold) through <>, etc. Many posts on this list would look great there. Generally speaking, wiki seem to have a potential of creating a nice interactive community. Thus far, not that many people seem to get interested though. Alec Mih

[sage-support] Re: Accessing terms in an expression

2008-07-03 Thread Alec Mihailovs
From: "David Joyner" <[EMAIL PROTECTED]> > I was wondering about this myself. Maple has a command that does > exactly this (I think it is the "ops" command). It's op. Maple represents objects using DAGs (directed acyclic graphs literally, but it also includes enumeration of child vertices), and

[sage-support] Re: Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread Alec Mihailovs
Michael Abshoff wrote: > It is about two orders of magnitude and it looks like your Maple code > is actually compiled. In case I am reading your code right could you > tell us what the runtime of an interpreted version of your code would > be like? I would guess that with Cython one could get sim

[sage-support] Re: Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread Alec Mihailovs
apleprimes.com/blog/alec/the-eratosthenes-sieve , time(ES2(10^7)); 0.702 Also, the number of primes given by your program is 1 more than it should be, ArrayNumElems(ES2(10^7)); 664579 Alec Mihailovs --~--~-~--~~

  1   2   >