[sage-support] Re: Using elements from matrix in equation?

2016-01-08 Thread slelievre


2016-01-01 15:29:20 -0800 (PST), Nils Bruin:

You are correct: AC is a 2-by-1 matrix, and AC[0] selects the first row. 
> You can select the appropriate elements via
>
> a = AC[0,0]
> b = AC[1,0]
>
> or
>
> a = AC[0][0]
> b = AC[1][0]
>

I would recommend the first syntax,

a = AC[0,0]

which just accesses the given element, and so it is faster than

a = AC[0][0]

which would create the vector AC[0] and then get its index 0 coordinate.

Moreover, if you want to change an element of a matrix, writing

AC[0,0] = 9

will work, while

AC[0][0] = 9

will fail.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Equivalence to Python -O flag ?

2016-01-08 Thread Volker Braun
PYTHONOPTIMIZE=1 sage


On Friday, January 8, 2016 at 4:35:45 PM UTC+1, tvn wrote:
>
> Is there no solution or suggestion to achieve this ?  How do you set the 
> __debug__ variable to 1 (i.e., equivalent to running Python with -O)  ?  
>
> On Wednesday, December 30, 2015 at 9:57:42 AM UTC-5, tvn wrote:
>>
>> Hi, is there in Sage that's equivalent to running python with the flag 
>> -O, i.e., python -O,  sets the __debug__ variable to 1 and remove all 
>> assertion code ?  I've tried sage -O and also look at sage -h but can't 
>> seem to find something like that.  
>> Thanks, 
>>
>>  
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: ERR_CONTENT_LENGTH_MISMATCH: SageMathCell Minimum Requirements

2016-01-08 Thread Andrey Novoseltsev
No idea, but the configuration of public servers is mostly public as well at
https://github.com/sagemath/sagecell/tree/master/contrib/vm
(what is missing are details of handling SSL certificates and some "high 
level" network adjustments for particular configuration - I highly doubt 
they can cause subtle issues like yours)

On Tuesday, 5 January 2016 20:51:36 UTC-7, Ruslan Korniichuk wrote:
>
>
> Hi all,
>
> we have very interesting bug with our SagaMathCell.
>
> Code example:
>
> plt = point( [(i,random()) for i in range(1)] )
> plt.save('1.png')
>
>
> Error from Chrome:
>
> GET 
> http://155.158.128.81:6363/kernel/c0bd901f-1705-4848-b95d-37fe1f45f37c/files/23.png?q=0
>  
> net::*ERR_CONTENT_LENGTH_MISMATCH*
>
>
> Your SageMath:
> https://sagecell.sagemath.org/?q=edajsy
>
>
> 
>
>
> Our first SageMathCell:
>
> https://sagecell.paad.us.edu.pl/
>
> Power: 8C CPU / 8GB RAM / Ubuntu OS
>
>
> 
>
> Our second SageMathCell:
>
> http://sagecell.icse.us.edu.pl:6363/
>
> Power: 8C CPU / 8GB RAM / Debian OS
>
>
> 
>
> Why it is not working as well as your SageMathCell?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Packages needed for self-compiled Sage on Ubuntu

2016-01-08 Thread HG
That's a very good idea : I got all suggested files and with one sudo 
apt-get install g++ gfortran m4 liblapack-dev libgsl0-dev libfftw3-dev 
libssl-dev libav-tools pandoc libffi-dev libssl-dev texlive-latex-extra 
lrzip autotools-dev tig openssh-client build-essential, compiling 

Le mercredi 6 janvier 2016 11:10:17 UTC+1, jori.ma...@uta.fi a écrit :
>
> Is there a list somewhere on Ubuntu packages that are needed to install 
> fully working Sage from source? 
>
> For example now I have a machine where view() does not work as LaTeX has 
> no tikz. Instead of every admin to do the same job it would be nice to 
> have a copy-and-paste help. 
>
> -- 
> Jori Mäntysalo 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Ipython config file not found

2016-01-08 Thread Paulo César Pereira de Andrade
On Wednesday, January 6, 2016 at 3:08:11 PM UTC-2, Jon Frey wrote:
>
> Problem with config file "missing" in Ipython
>
> System: Intel 64 bit /Fedora 23  Scientific flavor /KDE (latest updates 
> auto installed )
>  Sage Version 6.5, Release Date: 2015-02-17 
> Note1 : Other packages installed previously installed include Jupyter and 
> Spyder
> Note 2 :Jupyter , Spyder load (but not checked for functionality) 
>
> Versions loaded ( per console ) 
> Python 2.7.10 (default, Sep  8 2015, 17:20:17) 
> IPython 4.0.1 -- An enhanced Interactive Python.
>
>
>
> Sage was down loaded Sage from Fedora package repository as root with *"dnf 
> install sagemath"  *
> No errors posted on install.( It was very large unpacked  ) 
>
> Icon loaded in work space but fails to launch application ( console screen 
> disappears after briefly displaying) 
>
> Launching from console as 
> sage 
> sage -ipython
> sage -notebook=ipython
>
> All fail with error 
>
> *Console Error* 
> Traceback (most recent call last):
>   File "/usr/lib64/sagemath/local/bin/sage-ipython", line 6, in 
> from sage.repl.interpreter import SageTerminalApp
>   File "/usr/lib64/python2.7/site-packages/sage/repl/interpreter.py", line 
> 105, in 
> from IPython import Config
> ImportError: cannot import name Config
>
>
> Launching from console as -sage -notebook=sagenb does function and brings 
> up 
>
> *Error message from Sage notebook *
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in 
> full_dispatch_request
> rv = self.dispatch_request()
>   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in 
> dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
>   File "/usr/lib64/sagemath/src/sagenb/flask_version/decorators.py", line 
> 22, in wrapper
> return f(*args, **kwds)
>   File 
> "/usr/lib64/sagemath/src/sagenb/flask_version/worksheet_listing.py", line 
> 335, in upload_worksheet
> from sage.misc.all import tmp_filename, tmp_dir
>   File "/usr/lib64/python2.7/site-packages/sage/misc/all.py", line 67, in 
> 
> from log import log_html, log_dvi, log_text
>   File "/usr/lib64/python2.7/site-packages/sage/misc/log.py", line 64, in 
> 
> import sage.repl.interpreter as interpreter
>   File "/usr/lib64/python2.7/site-packages/sage/repl/interpreter.py", line 
> 105, in 
> from IPython import Config
> ImportError: cannot import name Config
>
> So I am assuming a file directory conflict with previously installed  
> Ipython and version packaged with the rpm at Fedora
>
> I need a simple fix and don't want to attempt to reconcile( or break)  the 
> other software installation 
>
>
>   Do you have ipython or something else in /usr/local, or somewhere else
before in $PATH?

  I confess I did not see this issue before, but I have basically only 
binaries
from rpm packages installed in my computer.

  I also usually have latest sagemath installed in my home directory, to
make some comparisons/tests with the rpm package.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Equivalence to Python -O flag ?

2016-01-08 Thread tvn
Is there no solution or suggestion to achieve this ?  How do you set the 
__debug__ variable to 1 (i.e., equivalent to running Python with -O)  ?  

On Wednesday, December 30, 2015 at 9:57:42 AM UTC-5, tvn wrote:
>
> Hi, is there in Sage that's equivalent to running python with the flag -O, 
> i.e., python -O,  sets the __debug__ variable to 1 and remove all assertion 
> code ?  I've tried sage -O and also look at sage -h but can't seem to find 
> something like that.  
> Thanks, 
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.