[sage-support] Re: Install sagemath in a server for multiple users

2019-06-30 Thread Pedro Cruz
- cocalc.com does not need instalation - https://github.com/sagemathinc/cocalc-docker needs instalation I don't know if this anwers the question. Pedro sábado, 29 de Junho de 2019 às 18:07:10 UTC+1, Samanta escreveu: > > What is the procedure of installing Sagemath in a server so that many

Re: [sage-support] complex numbers printing real part + imaginary part

2017-04-12 Thread Pedro Cruz
t()) else: return "{0} + {1}I".format(x.real_part(), abs(x.imag_part())) terça-feira, 11 de Abril de 2017 às 20:25:46 UTC+1, Jeroen Demeyer escreveu: > > On 2017-04-11 18:25, Pedro Cruz wrote: > > Hello, > > > > sage is printing b*I + a and we want

[sage-support] complex numbers printing real part + imaginary part

2017-04-11 Thread Pedro Cruz
Hello, sage is printing b*I + a and we want to see a + b * I What could we do ? We can create a function to print it a + b*I but is any other standard way? Thank you, Pedro -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from

Re: [sage-support] Re: view(g) where g is graph: does not respect colors

2015-12-02 Thread Pedro Cruz
The latex function print latex(g) is generating lines like \Vertex[style={minimum size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=rectangle},LabelOut=false,L=\hbox{$1$},x=1.5944cm,y=3.3989cm]{v0} and it seems that \Vertex[style={ }] is not working. I've checked tikz-graph manuel and

[sage-support] view(g) where g is graph: does not respect colors

2015-12-01 Thread Pedro Cruz
The following code (sage 6.9): sage: g = graphs.PetersenGraph() sage: g.set_latex_options(vertex_color='green') sage: view(g) produces a black-and-white graph. In SMC produces a graph with blue vertices. What can I do? Thank you, Pedro -- You received this message because you are

[sage-support] view(g) where g is graph: does not respect colors

2015-12-01 Thread Pedro Cruz
The following code (sage 6.9): sage: g = graphs.PetersenGraph() sage: g.set_latex_options(vertex_color='green') sage: view(g) produces a black-and-white graph. In SMC produces a graph with blue vertices. What can I do? Thank you, Pedro -- You received this message because you are

[sage-support] Basic Calculus in Two Variables

2015-03-30 Thread Pedro Cruz
In one variable sage: x.subs(x==10) works ok. How to do a pair substitution ? sage: var(x,y) (x, y) sage: (x,y).subs([x==10,y==20]) --- AttributeError: 'tuple' object has no attribute 'subs'

[sage-support] Re: How to vector with variables

2015-02-09 Thread Pedro Cruz
With Sagemath: ┌┐ │ Sage Version 5.12, Release Date: 2013-10-07│ └┘ sage: var(d,e,f) (d, e, f) sage: A = matrix(SR, [ [1,2,3], [3,2,1],

Re: [sage-support] latex and hold parameter

2015-01-23 Thread Pedro Cruz
Hello, using Sage 6.2 there is this behaviour: sage: SR(2).power(3,hold=True) 2^3 sage: 3*SR(2).power(3,hold=True) 3*8 or sage: SR(2*x).power(3,hold=True) (2*x)^3 sage: 4 * SR(2*x).power(3,hold=True) 4*(8*x^3) which I don't know if it is expected. Because we want some expressions no to be

[sage-support] latex and hold parameter

2015-01-16 Thread Pedro Cruz
An unexpected behaviour in latex() command (both 5.12 and 6.4 Sage versions): sage: latex( 120/factorial(5,hold=True) ) \frac{120}{120} sage: latex( factorial(5,hold=True) ) 5! We need to hold the expression for proper latex transcription. Is there any other way to avoid latex() to compute

[sage-support] reflexive @interact controls (control values update)

2014-05-08 Thread Pedro Cruz
Is possible that after user action on interaction control X the function that updates the interact screen could also update the X control possible values ? Thank you, Pedro -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from

[sage-support] G.relabel problem

2014-04-25 Thread Pedro Cruz
To the graph package maintainers, Using G.relabel( [ i+1 for i in range(G.order()) ], inplace=True ) and repeat the same command once more causes the error below. But using G.relabel(lambda i: i+1, inplace=True) twice does not produce the error. (at least this it's not intuitive for me)

[sage-support] bar charts (two columsn for each category)

2014-01-30 Thread Pedro Cruz
Hello, what's the easiest way to draw bar charts (two columns for each category) since they are not yet implemented in Sage? Is it possible to hide only Xaxis on a plot? Thank you, Pedro -- You received this message because you are subscribed to the Google Groups sage-support group. To

[sage-support] arrows on the end of axes

2014-01-14 Thread Pedro Cruz
HI, I would like to solve the arrows on the end of axes in a plot but for Sage 5.2. I've read this, targetting Sge 6.1: http://trac.sagemath.org/ticket/10740 but I would like some more help to try to do it in Sage 5.2. Any help ? Thanks, Pedro -- You received this message because you

[sage-support] SR.wild(0) and abs function

2013-11-08 Thread Pedro Cruz
(I've did a little search on this but couldn't found the solution.) How to use SR.wild(0) when abs is present in an expression ? Thanks. Pedro EXAMPLE 1 (with abs) t=var('t') w0 = SR.wild(0) e1 = abs(cos(t))^2; print e1 print e1.subs( abs(w0)^2 == w0 ) abs(cos(t))^2 abs(cos(t))#abs

[sage-support] log for high school

2013-11-05 Thread Pedro Cruz
function as an answer. Is this the proper way to do it in Sage ? Could it be better and simple? Thank you, Pedro Cruz [1] http://www.sagemath.org/doc/reference/functions/sage/functions/log.html [2] http://www.sagemath.org/doc/reference/coercion/ About the subject: in some moment, in the portuguese

[sage-support] A log(101,base=10) that doesn't reply log(101)/log(10)

2013-10-28 Thread Pedro Cruz
Dear Sage supporters, [image: i like this post (click again to cancel)] 1 [image: i dont like this post (click again to cancel)] How can I develop the function below ? Where should I start to read? HSLOG = High School Log. Treat forms like `\log_b(a^p)` in a special manner. Standard sage log

[sage-support] Re: problem installing sage 5.11

2013-08-20 Thread Pedro Cruz
18:05:11 UTC+1, Dima Pasechnik escreveu: On 2013-08-19, Pedro Cruz pedrocr...@gmail.com javascript: wrote: --=_Part_528_16021328.1376911141827 Content-Type: text/plain; charset=ISO-8859-1 I'm doing what i've been doing from long ago: 1. wget sage.lzma 2 tar --lzma -xvf

[sage-support] problem installing sage 5.11

2013-08-19 Thread Pedro Cruz
I'm doing what i've been doing from long ago: 1. wget sage.lzma 2 tar --lzma -xvf sage.lzma 3. change directory inside sage/sage script 4. enter sage directory 5. run ./sage It does stop with this error : sageserver@faisca:~/sage-5.11$ ./sage

[sage-support] Sage Cell Server and Modules

2013-07-18 Thread Pedro Cruz
Dear Sage Cell users and authors, We are planning to embed http://sagecell.sagemath.org/ at our local page P. What is the best way to incorporate a *simple* sage/python module for all calculations using our local sage page P ? Thank you, Pedro -- You received this message because you

[sage-support] Chrome Web Store and demo.sagenb.org

2012-11-15 Thread Pedro Cruz
Just to note that the Chrome Web Store for Sage is not working because demo.sagenb.org is down. Pedro -- You received this message because you are subscribed to the Google Groups sage-support group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this

[sage-support] graphics save svg to string

2012-06-29 Thread Pedro Cruz
Consider this sequence: g = Graphics() g += ... primitives.. g.save(tempfile.svg) Is there any command like: one_str = g.savestring(svg) that avoids opening and reading tempfile.svg ? Thank you. -- To post to this group, send email to sage-support@googlegroups.com To

[sage-support] Re: Bug with two Latex().eval() in Sage Notebook

2012-04-07 Thread Pedro Cruz
Possible hint: I did not check Latex().eval() code but probably it uses temporary random filenames to store the object to the file and then to compile it and that's why there is no fixed order at output (maybe filename alphabetic order). Pedro Quinta-feira, 5 de Abril de 2012 17:32:59

[sage-support] Re: Best way to develop Sage packages?

2012-03-30 Thread Pedro Cruz
I don't know if this below is a standard way but it works to develop stand alone packages: At sage package directory, for example, /opt/sage-some-version/local/lib/python2.6/site-packages/ execute ln -s /home/user1/newpackage/ where newpackage is a directory with all files

[sage-support] possible instalation bug with package numpy in 32bit version (Sage 4.8)

2012-03-01 Thread Pedro Cruz
Doing: sage: import numpy on a fresh sage instalation: Platform (CPU) and Operating System: ubuntu 32 bit LTS 10.04 Exact version of Sage: 'Sage Version 4.8, Release Date: 2012-01-20' (32 bit) causes error: /home/jpedro/sage/local/lib/python2.6/site-packages/numpy/lib/polynomial.py in

[sage-support] simple integration with absolute value

2011-07-11 Thread Pedro Cruz
Good morning, the command integrate( abs(x^2-1), x, -2,2) does not do the job automatically. I have seen on this discussion group another, at least, similar message. Is there an organized list of functions that are yet implemented for integration? How can one cooperate without being a sage

[sage-support] cython and wiki.sagemath.org/SageServer: Permission denied

2011-02-28 Thread Pedro Cruz
I have followed instructions on http://wiki.sagemath.org/SageServer and it seems that everything is ok: creating new user, doing cell computations. For cython I'm getting IOError: [Errno 13] Permission denied in a cell, of notebook sage 4.6.1, with: - %cython def

[sage-support] Re: notebook: how store a cell contents in a database

2011-02-21 Thread Pedro Cruz
I'm going to add input += '_interact_.SAGE_CELL_BZ2TEXT=%r\n' % bz2.compress(C.input_text()) to ~/sage/devel/sagenb/sagenb/notebook/worksheet.py in function start_next_comp() It uses bz2 because it's already on worksheet.py and to avoid string_inside_string problems. This delays

[sage-support] notebook: how store a cell contents in a database

2011-02-17 Thread Pedro Cruz
I'm writting an application were a person develops an algorithm using the sage notebook (on his computer, for example). That algorithm will be developed inside a notebook cell. Then I would like to store that cell contents in a common database automatically avoiding cut/paste to another place.

[sage-support] Re: Showing a custom number of decimal places

2010-10-15 Thread Pedro Cruz
My suggestion is: x=var('x') rf = RealField(prec=10) #10 bits g(x) = -rf(-0.1) * x^4 print g print g(1.2345) but before try: preparse('g(x) = -0.1 * x^4') It seems that Sage always prints the full and correct representation of the RealNumber and not just an approximation. In this matter Sage

[sage-support] Re: modulo operator for reals

2010-10-09 Thread Pedro Cruz
This command plot(k%1,k,0,5) produce an error. That % python operator does differently from simple modulo: 1.9%1 -0.1 1.5%1 -0.5 2.5 %1 0.5 It was strange that with k/1 plot works fine but not with k%1. Pedro On 9 Out, 15:19, Don Krug dandd.k...@gmail.com wrote: On Oct 4, 7:03 pm,

[sage-support] sum, value of a sum, function based on a sum, approximate sum

2010-10-05 Thread Pedro Cruz
/2), i, 0, 10) #SUMATION but if I do sum((i^2 + 0.0246*i + 1.00015129)^(-3/2), i, 0, 10) 1.49935960541 How can I turn the #SUMATION to a number when I call function h? Thanks Pedro Cruz -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group

[sage-support] Re: sum, value of a sum, function based on a sum, approximate sum

2010-10-05 Thread Pedro Cruz
+ 0.0246*i + 1.00015129)^(-3/2), i, 0, 10) #SUMATION 1.499... where sage knows it's all numbers. In the screen they are exactly the same. Internally they are different. Pedro On Oct 5, 3:24 pm, Pedro Cruz pedrocruzave...@gmail.com wrote: Why in this code: r,a,n,i,noo=var('r,a,n,i,noo