[sage-support] Is jupyter broken in sage 7.6?

2017-04-14 Thread Stan Schymanski
Dear all,
I just upgraded to 7.6 on Debian jessie, but when I try to run the jupyter 
notebook, I get the below error message. When I just run `sage` and then 
notebook(), I don't get any error messages. Has anyone experienced this 
problem as well? If not, I may try to re-install sage 7.6 instead of trying 
to fix the upgrade. Thanks already!

Cheers
Stan

:~/Programs/sage-upgrade$ ./sage -n jupyter
┌┐
│ SageMath version 7.6, Release Date: 2017-03-25 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
Please wait while the Sage Jupyter Notebook server starts...
[I 23:10:47.167 NotebookApp] Using MathJax: nbextensions/mathjax/MathJax.js
[I 23:10:47.591 NotebookApp] The port  is already in use, trying 
another port.
[I 23:10:47.601 NotebookApp] Serving notebooks from local directory: 
/home/sschyman/Programs/sage-upgrade
[I 23:10:47.601 NotebookApp] 0 active kernels 
[I 23:10:47.601 NotebookApp] The Jupyter Notebook is running at: 
http://localhost:8889/?token=b0a267685a1ce824e08e1d507415fa3ee14504c3806ebd58
[I 23:10:47.601 NotebookApp] Use Control-C to stop this server and shut 
down all kernels (twice to skip confirmation).
[C 23:10:47.601 NotebookApp] 

Copy/paste this URL into your browser when you connect for the first 
time,
to login with a token:

http://localhost:8889/?token=b0a267685a1ce824e08e1d507415fa3ee14504c3806ebd58
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/user/Programs/sage-upgrade/local/lib/python/threading.py", 
line 801, in __bootstrap_inner
self.run()
  File "/home/user/Programs/sage-upgrade/local/lib/python/threading.py", 
line 754, in run
self.__target(*self.__args, **self.__kwargs)
  File 
"/home/user/Programs/sage-upgrade/local/lib/python2.7/site-packages/notebook/notebookapp.py",
 
line 1227, in 
new=2)
  File "/home/user/Programs/sage-upgrade/local/lib/python/webbrowser.py", 
line 275, in open
success = self._invoke(args, True, autoraise)
  File "/home/user/Programs/sage-upgrade/local/lib/python/webbrowser.py", 
line 238, in _invoke
stderr=inout, preexec_fn=setsid)
  File "/home/user/Programs/sage-upgrade/local/lib/python/subprocess.py", 
line 390, in __init__
errread, errwrite)
  File "/home/user/Programs/sage-upgrade/local/lib/python/subprocess.py", 
line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

-- 
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: export of sagenb to jupyter not working?

2016-09-07 Thread Stan Schymanski
Indeed, sagenb_export* does not exist in the logs, so it probably hasn't 
been compiled. Now that you mention this, I remember that I did have some 
hick-ups during the upgrade, but then forgot about them because sage ran 
well afterwards. Just installed manually as you suggested and running make 
again as recommended in the installation messages. Sorry for keeping you 
busy with this, and thanks for pointing me to this problem!

Cheers
Stan

On Tuesday, September 6, 2016 at 11:32:55 PM UTC+2, Volker Braun wrote:
>
> I guess something went wrong when compiling Sage?
>
> Can you post your logs/pkgs/sagenb_export-2.0.log
>
> You can try to run "sage -p sagenb_export" to install it by hand
>
> On Tuesday, September 6, 2016 at 2:34:38 PM UTC+2, Stan Schymanski wrote:
>>
>> Sorry for the late response. I cannot upload all my worksheets, as they 
>> are in the 100s. But here is the error message:
>>
>> ~/Programs/sage-upgrade$ ./sage --notebook=export --list
>> Traceback (most recent call last):
>>   File "~/Programs/sage-upgrade/src/bin/sage-notebook", line 225, in 
>> 
>> launcher(unknown)
>>   File "~/Programs/sage-upgrade/src/bin/sage-notebook", line 116, in 
>> __init__
>> os.execvp(SAGENB_EXPORT, [SAGENB_EXPORT] + argv)
>>   File "~/Programs/sage-upgrade/local/lib/python/os.py", line 346, in 
>> execvp
>> _execvpe(file, args)
>>   File "~/Programs/sage-upgrade/local/lib/python/os.py", line 382, in 
>> _execvpe
>> func(fullname, *argrest)
>> OSError: [Errno 2] No such file or directory
>>
>>
>>
>>
>>
>>
>> On Friday, August 26, 2016 at 11:30:55 PM UTC+2, Volker Braun wrote:
>>>
>>> can you upload them somewhere or at least post your error message?
>>>
>>> On Friday, August 26, 2016 at 10:27:42 PM UTC+2, Stan Schymanski wrote:
>>>>
>>>> I have > 400 worksheets in ~/.sage/sage_notebook.sagenb/home/admin.
>>>>
>>>> On Friday, August 26, 2016 at 7:44:15 PM UTC+2, Volker Braun wrote:
>>>>>
>>>>> Do you have worksheets in sagenb? They should be 
>>>>> in ~/.sage/sage_notebook.sagenb/
>>>>>
>>>>>
>>>>>

-- 
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: export of sagenb to jupyter not working?

2016-09-06 Thread Stan Schymanski
I compiled sage in a subdirectory, ~/Programs/sage-upgrade, while my 
notebook is in ~/.sage.
I tried executing Programs/sage-upgrade/sage --notebook=export --list from 
my home directory and /.sage --notebook=export --list from 
~/Programs/sage-upgrade, but got the same error. Is there a way to pass the 
notebook path when calling sage --notebook=export? That would be awesome.

On Saturday, August 27, 2016 at 12:55:47 AM UTC+2, kcrisman wrote:
>
> I think I had some similar problems - you have to do this in the right 
> directory.  Don't remember the exact details but I think within the Sage 
> directory is best?
>
> On Friday, August 26, 2016 at 4:27:42 PM UTC-4, Stan Schymanski wrote:
>>
>> I have > 400 worksheets in ~/.sage/sage_notebook.sagenb/home/admin.
>>
>> On Friday, August 26, 2016 at 7:44:15 PM UTC+2, Volker Braun wrote:
>>>
>>> Do you have worksheets in sagenb? They should be 
>>> in ~/.sage/sage_notebook.sagenb/
>>>
>>>
>>>

-- 
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: export of sagenb to jupyter not working?

2016-09-06 Thread Stan Schymanski
Sorry for the late response. I cannot upload all my worksheets, as they are 
in the 100s. But here is the error message:

~/Programs/sage-upgrade$ ./sage --notebook=export --list
Traceback (most recent call last):
  File "~/Programs/sage-upgrade/src/bin/sage-notebook", line 225, in 

launcher(unknown)
  File "~/Programs/sage-upgrade/src/bin/sage-notebook", line 116, in 
__init__
os.execvp(SAGENB_EXPORT, [SAGENB_EXPORT] + argv)
  File "~/Programs/sage-upgrade/local/lib/python/os.py", line 346, in execvp
_execvpe(file, args)
  File "~/Programs/sage-upgrade/local/lib/python/os.py", line 382, in 
_execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory






On Friday, August 26, 2016 at 11:30:55 PM UTC+2, Volker Braun wrote:
>
> can you upload them somewhere or at least post your error message?
>
> On Friday, August 26, 2016 at 10:27:42 PM UTC+2, Stan Schymanski wrote:
>>
>> I have > 400 worksheets in ~/.sage/sage_notebook.sagenb/home/admin.
>>
>> On Friday, August 26, 2016 at 7:44:15 PM UTC+2, Volker Braun wrote:
>>>
>>> Do you have worksheets in sagenb? They should be 
>>> in ~/.sage/sage_notebook.sagenb/
>>>
>>>
>>>

-- 
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: export of sagenb to jupyter not working?

2016-08-26 Thread Stan Schymanski
I have > 400 worksheets in ~/.sage/sage_notebook.sagenb/home/admin.

On Friday, August 26, 2016 at 7:44:15 PM UTC+2, Volker Braun wrote:
>
> Do you have worksheets in sagenb? They should be 
> in ~/.sage/sage_notebook.sagenb/
>
>
>

-- 
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] export of sagenb to jupyter not working?

2016-08-26 Thread Stan Schymanski
I upgraded to sage 7.3, hoping that I would be able to convert some of my 
sagenb worksheets to jupyter, using "sage --notebook=export", however, 
"sage --notebook=export --list" fails with "No such file or directory". Do 
I need to provide the path to my sagenb notebook somehow? If I just do 
"./sage -notebook", it finds and opens my sagenb notebook, so I don't 
understand why "export --list" returns an error.. Thanks for your help!

-- 
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: How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
I have upgraded to sage 7.3 and now "sage --notebook=export --list" does 
something but fails with "No such file or directory". Do I need to provide 
the path to my sagenb notebook somehow? If I just do "./sage -notebook", it 
finds and opens my sagenb notebook, so I don't understand what is going on. 
Thanks again for your help!

On Friday, August 26, 2016 at 2:35:04 PM UTC+2, Stan Schymanski wrote:
>
> Thanks, I saw this, but it didn't work in my installed sage 7.2. Currently 
> upgrading to 7.3. I couldn't find out which version of sage #19877 was 
> merged into.
>
> On Friday, August 26, 2016 at 1:25:55 PM UTC+2, Dima Pasechnik wrote:
>>
>>
>>
>> On Friday, August 26, 2016 at 12:19:58 PM UTC+1, HG wrote:
>>>
>>> Yes... But I have read somewhere there is a convert tool ? As I need to 
>>> practice I did it by hand.
>>> I know that smc  can convert them in smc file and maybe you can download 
>>> it in ipynb because SMC is well develop in this domain.
>>>
>>
>> on a standalone sage installation one can run 
>>
>>sage --notebook=export
>>
>> see https://trac.sagemath.org/ticket/19877
>> and links therein for details.
>>
>> Cheers 
>>> Henri
>>>
>>> Le vendredi 26 août 2016 10:55:17 UTC+2, Stan Schymanski a écrit :
>>>>
>>>> Dear all,
>>>>
>>>> I have been using sagemath for research for many years now, and I am 
>>>> extremely happy with it. For my latest papers, I would like to make the 
>>>> sage code available to the public, so that people can follow through what 
>>>> I 
>>>> did and re-use the code for their own data. The journal's guidelines also 
>>>> ask to make any relevant data and code available. Of course, I could just 
>>>> upload it to some generic data server, but it would be so great to also 
>>>> make it available on a sage server, which would render the worksheets 
>>>> correctly and where people could start working with it straight away. I 
>>>> believe that this would make a lot more scientists aware of the benefits 
>>>> of 
>>>> sagemath. 
>>>>
>>>> There used to be several open sagemath servers around, but the ones I 
>>>> used previously have disappeared, probably at the same time as sagemath 
>>>> cloud (SMC) made its appearance. I gather that SMC is commercial, meant to 
>>>> generate funds for the further development of sagemath. I hope it takes 
>>>> off. However, this also means that SMC is likely not the right place to 
>>>> permanently publish worksheets, as they would be taken down once I stop 
>>>> paying the fees for some reason. Can anyone suggest a suitable place for 
>>>> that? The minimum requirement is that the worksheet can be viewed and 
>>>> downloaded. Being able to execute and modify cells would be a bonus, and 
>>>> long-term availability (permalink?) would be another bonus. I haven't seen 
>>>> any "public" worksheets on SMC, in the way the old sage servers worked. 
>>>> Would there be scope to create such a space in SMC, so to say as an 
>>>> advertisement? 
>>>>
>>>>

-- 
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: How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
reference equations across cells

On Friday, August 26, 2016 at 1:25:55 PM UTC+2, Dima Pasechnik wrote:
>
>
>
> On Friday, August 26, 2016 at 12:19:58 PM UTC+1, HG wrote:
>>
>> Yes... But I have read somewhere there is a convert tool ? As I need to 
>> practice I did it by hand.
>> I know that smc  can convert them in smc file and maybe you can download 
>> it in ipynb because SMC is well develop in this domain.
>>
>
> on a standalone sage installation one can run 
>
>sage --notebook=export
>
> see https://trac.sagemath.org/ticket/19877
> and links therein for details.
>
> Cheers 
>> Henri
>>
>> Le vendredi 26 août 2016 10:55:17 UTC+2, Stan Schymanski a écrit :
>>>
>>> Dear all,
>>>
>>> I have been using sagemath for research for many years now, and I am 
>>> extremely happy with it. For my latest papers, I would like to make the 
>>> sage code available to the public, so that people can follow through what I 
>>> did and re-use the code for their own data. The journal's guidelines also 
>>> ask to make any relevant data and code available. Of course, I could just 
>>> upload it to some generic data server, but it would be so great to also 
>>> make it available on a sage server, which would render the worksheets 
>>> correctly and where people could start working with it straight away. I 
>>> believe that this would make a lot more scientists aware of the benefits of 
>>> sagemath. 
>>>
>>> There used to be several open sagemath servers around, but the ones I 
>>> used previously have disappeared, probably at the same time as sagemath 
>>> cloud (SMC) made its appearance. I gather that SMC is commercial, meant to 
>>> generate funds for the further development of sagemath. I hope it takes 
>>> off. However, this also means that SMC is likely not the right place to 
>>> permanently publish worksheets, as they would be taken down once I stop 
>>> paying the fees for some reason. Can anyone suggest a suitable place for 
>>> that? The minimum requirement is that the worksheet can be viewed and 
>>> downloaded. Being able to execute and modify cells would be a bonus, and 
>>> long-term availability (permalink?) would be another bonus. I haven't seen 
>>> any "public" worksheets on SMC, in the way the old sage servers worked. 
>>> Would there be scope to create such a space in SMC, so to say as an 
>>> advertisement? 
>>>
>>>

-- 
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: How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
I upgraded to sage 7.3 and now ./sage --notebook=export --list does 
something, but ends up with "No such file or directory". Do you know if we 
need to provide the location of the sagenb notebook somehow? .sage 
-notebook does find and open my sagenb notebook, so I don't know what is 
going on. Thanks again for your help!

On Friday, August 26, 2016 at 1:25:55 PM UTC+2, Dima Pasechnik wrote:
>
>
>
> On Friday, August 26, 2016 at 12:19:58 PM UTC+1, HG wrote:
>>
>> Yes... But I have read somewhere there is a convert tool ? As I need to 
>> practice I did it by hand.
>> I know that smc  can convert them in smc file and maybe you can download 
>> it in ipynb because SMC is well develop in this domain.
>>
>
> on a standalone sage installation one can run 
>
>sage --notebook=export
>
> see https://trac.sagemath.org/ticket/19877
> and links therein for details.
>
> Cheers 
>> Henri
>>
>> Le vendredi 26 août 2016 10:55:17 UTC+2, Stan Schymanski a écrit :
>>>
>>> Dear all,
>>>
>>> I have been using sagemath for research for many years now, and I am 
>>> extremely happy with it. For my latest papers, I would like to make the 
>>> sage code available to the public, so that people can follow through what I 
>>> did and re-use the code for their own data. The journal's guidelines also 
>>> ask to make any relevant data and code available. Of course, I could just 
>>> upload it to some generic data server, but it would be so great to also 
>>> make it available on a sage server, which would render the worksheets 
>>> correctly and where people could start working with it straight away. I 
>>> believe that this would make a lot more scientists aware of the benefits of 
>>> sagemath. 
>>>
>>> There used to be several open sagemath servers around, but the ones I 
>>> used previously have disappeared, probably at the same time as sagemath 
>>> cloud (SMC) made its appearance. I gather that SMC is commercial, meant to 
>>> generate funds for the further development of sagemath. I hope it takes 
>>> off. However, this also means that SMC is likely not the right place to 
>>> permanently publish worksheets, as they would be taken down once I stop 
>>> paying the fees for some reason. Can anyone suggest a suitable place for 
>>> that? The minimum requirement is that the worksheet can be viewed and 
>>> downloaded. Being able to execute and modify cells would be a bonus, and 
>>> long-term availability (permalink?) would be another bonus. I haven't seen 
>>> any "public" worksheets on SMC, in the way the old sage servers worked. 
>>> Would there be scope to create such a space in SMC, so to say as an 
>>> advertisement? 
>>>
>>>

-- 
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: How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
Thanks, I saw this, but it didn't work in my installed sage 7.2. Currently 
upgrading to 7.3. I couldn't find out which version of sage #19877 was 
merged into.

On Friday, August 26, 2016 at 1:25:55 PM UTC+2, Dima Pasechnik wrote:
>
>
>
> On Friday, August 26, 2016 at 12:19:58 PM UTC+1, HG wrote:
>>
>> Yes... But I have read somewhere there is a convert tool ? As I need to 
>> practice I did it by hand.
>> I know that smc  can convert them in smc file and maybe you can download 
>> it in ipynb because SMC is well develop in this domain.
>>
>
> on a standalone sage installation one can run 
>
>sage --notebook=export
>
> see https://trac.sagemath.org/ticket/19877
> and links therein for details.
>
> Cheers 
>> Henri
>>
>> Le vendredi 26 août 2016 10:55:17 UTC+2, Stan Schymanski a écrit :
>>>
>>> Dear all,
>>>
>>> I have been using sagemath for research for many years now, and I am 
>>> extremely happy with it. For my latest papers, I would like to make the 
>>> sage code available to the public, so that people can follow through what I 
>>> did and re-use the code for their own data. The journal's guidelines also 
>>> ask to make any relevant data and code available. Of course, I could just 
>>> upload it to some generic data server, but it would be so great to also 
>>> make it available on a sage server, which would render the worksheets 
>>> correctly and where people could start working with it straight away. I 
>>> believe that this would make a lot more scientists aware of the benefits of 
>>> sagemath. 
>>>
>>> There used to be several open sagemath servers around, but the ones I 
>>> used previously have disappeared, probably at the same time as sagemath 
>>> cloud (SMC) made its appearance. I gather that SMC is commercial, meant to 
>>> generate funds for the further development of sagemath. I hope it takes 
>>> off. However, this also means that SMC is likely not the right place to 
>>> permanently publish worksheets, as they would be taken down once I stop 
>>> paying the fees for some reason. Can anyone suggest a suitable place for 
>>> that? The minimum requirement is that the worksheet can be viewed and 
>>> downloaded. Being able to execute and modify cells would be a bonus, and 
>>> long-term availability (permalink?) would be another bonus. I haven't seen 
>>> any "public" worksheets on SMC, in the way the old sage servers worked. 
>>> Would there be scope to create such a space in SMC, so to say as an 
>>> advertisement? 
>>>
>>>

-- 
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.


Re: [sage-support] How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
Awesome, thanks! How did you convert sws to ipynb?? By hand?
Cheers
Stan

On Friday, August 26, 2016 at 11:47:27 AM UTC+2, HG wrote:
>
> Well you know I am not an expert. But I am in France and SMC in europa is 
> often slow and even one can't use it !
>
> As I used ijulia, they told me I should create a github (in fact I had it 
> created long ago, but wasn't able to use it... But things fortunatly 
> improved and I saw, that nbviewer was automatically working : Great !)
>
> So for ipynb there shouldn't be any problem. For sws I guess it's 
> different, I haven't try it anywere as it seems to need a server. I use it 
> in local. That's why I convert all my sws in ipynb.
> That's the mails which help me created github and using it 
>
>
> http://julia-programming-language.2336112.n4.nabble.com/I-have-done-few-examples-where-can-I-put-them-at-disposition-td43483.html
> Hope this help ?
> Henri
>
>
>
> Le 26/08/2016 à 11:28, Stan Schymanski a écrit :
>
> Wow, I didn't realise ipynb worksheets get rendered on github! How did you 
> do this? I looked at this one: 
> https://github.com/aishenri/julexample/blob/master/phaseportraitplots-test.ipynb,
>  
> downloaded and uploaded to SMC, but couldn't open it there. Not sure what I 
> did wrong. If one could make the worksheets be displayed nicely in github 
> and then add instructions for how to get them somewhere to be able to edit, 
> such as SMC, that would already take us a long way. If this also works for 
> sws worksheets, this would satisfy 2 of my requirements, permanent, and 
> rendered. Do you know if it would work with sws? Can you explain a bit more?
>
> On Friday, August 26, 2016 at 10:59:34 AM UTC+2, HG wrote: 
>>
>> Why don't you create a github it will show it with nbviewer automatically 
>> ?
>>
>> Here is mine (not specially interesting) but apparently all your work 
>> could be view :)
>>
>> https://github.com/aishenri
>>
>> Le 26/08/2016 à 10:55, Stan Schymanski a écrit :
>>
>> Dear all,
>>
>> I have been using sagemath for research for many years now, and I am 
>> extremely happy with it. For my latest papers, I would like to make the 
>> sage code available to the public, so that people can follow through what I 
>> did and re-use the code for their own data. The journal's guidelines also 
>> ask to make any relevant data and code available. Of course, I could just 
>> upload it to some generic data server, but it would be so great to also 
>> make it available on a sage server, which would render the worksheets 
>> correctly and where people could start working with it straight away. I 
>> believe that this would make a lot more scientists aware of the benefits of 
>> sagemath. 
>>
>> There used to be several open sagemath servers around, but the ones I 
>> used previously have disappeared, probably at the same time as sagemath 
>> cloud (SMC) made its appearance. I gather that SMC is commercial, meant to 
>> generate funds for the further development of sagemath. I hope it takes 
>> off. However, this also means that SMC is likely not the right place to 
>> permanently publish worksheets, as they would be taken down once I stop 
>> paying the fees for some reason. Can anyone suggest a suitable place for 
>> that? The minimum requirement is that the worksheet can be viewed and 
>> downloaded. Being able to execute and modify cells would be a bonus, and 
>> long-term availability (permalink?) would be another bonus. I haven't seen 
>> any "public" worksheets on SMC, in the way the old sage servers worked. 
>> Would there be scope to create such a space in SMC, so to say as an 
>> advertisement? 
>>
>> -- 
>> 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...@googlegroups.com.
>> To post to this group, send email to sage-s...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
> 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...@googlegroups.com .
> To post to this group, send email to sage-s...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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: How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
Ah, I found the "Share..." button on SMC, which then allows to publish. 
Here is an example: 
https://cloud.sagemath.com/projects/34b4b62a-2621-47c8-9bda-cde3a855f995/files/v-notch.sagews
It appears that .sws (i.e. sagenb worksheets) get automatically converted 
to .sagews, which seems to work in SMC. I guess that in the long term, I 
will have to get away from sagenb and start using jupyter? What a shame, as 
sagenb works just great.
Then, maybe a combination of github and SMC will be the best approach.

>
>

-- 
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.


Re: [sage-support] How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
Wow, I didn't realise ipynb worksheets get rendered on github! How did you 
do this? I looked at this one: 
https://github.com/aishenri/julexample/blob/master/phaseportraitplots-test.ipynb,
 
downloaded and uploaded to SMC, but couldn't open it there. Not sure what I 
did wrong. If one could make the worksheets be displayed nicely in github 
and then add instructions for how to get them somewhere to be able to edit, 
such as SMC, that would already take us a long way. If this also works for 
sws worksheets, this would satisfy 2 of my requirements, permanent, and 
rendered. Do you know if it would work with sws? Can you explain a bit more?

On Friday, August 26, 2016 at 10:59:34 AM UTC+2, HG wrote:
>
> Why don't you create a github it will show it with nbviewer automatically ?
>
> Here is mine (not specially interesting) but apparently all your work 
> could be view :)
>
> https://github.com/aishenri
>
> Le 26/08/2016 à 10:55, Stan Schymanski a écrit :
>
> Dear all,
>
> I have been using sagemath for research for many years now, and I am 
> extremely happy with it. For my latest papers, I would like to make the 
> sage code available to the public, so that people can follow through what I 
> did and re-use the code for their own data. The journal's guidelines also 
> ask to make any relevant data and code available. Of course, I could just 
> upload it to some generic data server, but it would be so great to also 
> make it available on a sage server, which would render the worksheets 
> correctly and where people could start working with it straight away. I 
> believe that this would make a lot more scientists aware of the benefits of 
> sagemath. 
>
> There used to be several open sagemath servers around, but the ones I used 
> previously have disappeared, probably at the same time as sagemath cloud 
> (SMC) made its appearance. I gather that SMC is commercial, meant to 
> generate funds for the further development of sagemath. I hope it takes 
> off. However, this also means that SMC is likely not the right place to 
> permanently publish worksheets, as they would be taken down once I stop 
> paying the fees for some reason. Can anyone suggest a suitable place for 
> that? The minimum requirement is that the worksheet can be viewed and 
> downloaded. Being able to execute and modify cells would be a bonus, and 
> long-term availability (permalink?) would be another bonus. I haven't seen 
> any "public" worksheets on SMC, in the way the old sage servers worked. 
> Would there be scope to create such a space in SMC, so to say as an 
> advertisement? 
>
> -- 
> 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...@googlegroups.com .
> To post to this group, send email to sage-s...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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] How to "publish" a sage worksheet permanently?

2016-08-26 Thread Stan Schymanski
Dear all,

I have been using sagemath for research for many years now, and I am 
extremely happy with it. For my latest papers, I would like to make the 
sage code available to the public, so that people can follow through what I 
did and re-use the code for their own data. The journal's guidelines also 
ask to make any relevant data and code available. Of course, I could just 
upload it to some generic data server, but it would be so great to also 
make it available on a sage server, which would render the worksheets 
correctly and where people could start working with it straight away. I 
believe that this would make a lot more scientists aware of the benefits of 
sagemath. 

There used to be several open sagemath servers around, but the ones I used 
previously have disappeared, probably at the same time as sagemath cloud 
(SMC) made its appearance. I gather that SMC is commercial, meant to 
generate funds for the further development of sagemath. I hope it takes 
off. However, this also means that SMC is likely not the right place to 
permanently publish worksheets, as they would be taken down once I stop 
paying the fees for some reason. Can anyone suggest a suitable place for 
that? The minimum requirement is that the worksheet can be viewed and 
downloaded. Being able to execute and modify cells would be a bonus, and 
long-term availability (permalink?) would be another bonus. I haven't seen 
any "public" worksheets on SMC, in the way the old sage servers worked. 
Would there be scope to create such a space in SMC, so to say as an 
advertisement? 

-- 
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: sudden amnesia in sage worksheet

2015-10-28 Thread Stan Schymanski
Update: After restarting the worksheet, memory usage goes down to 972.36, 
so there seem to have been some data in memory but just not accessible. 
However, I am not sure if get_memory_usage() gives the memory usage of the 
worksheet or the whole notebook and I did things in other worksheets before 
restarting.

On Wednesday, October 28, 2015 at 9:18:42 AM UTC+1, Stan Schymanski wrote:
>
> Dear all,
>
> I ran a series of computations in a sage workheet using the "Evaluate all" 
> button, which takes a whole night. When I checked this morning, I realised 
> that while running a particular cell towards the end, the computation was 
> aborted half way through without an error message and all subsequent cells 
> just returned:
> NameError: name 'fun_Ta_gsv_arrays' is not defined
>
> When checking, I found out that all my objects defined in this worksheet 
> had disappeared from memory. Since there was no error message, I am tapping 
> in the dark. Any ideas? I'm suspecting some memory issues, but not sure how 
> to check that. get_memory_usage() after the amnesia returns 1076.37, but I 
> have no idea if this is an indication that my arrays are still stored 
> somewhere and only the pointers are gone or if all is gone. 
>
> Thanks for your help already!
>
>
>
>

-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] sudden amnesia in sage worksheet

2015-10-28 Thread Stan Schymanski
Dear all,

I ran a series of computations in a sage workheet using the "Evaluate all" 
button, which takes a whole night. When I checked this morning, I realised 
that while running a particular cell towards the end, the computation was 
aborted half way through without an error message and all subsequent cells 
just returned:
NameError: name 'fun_Ta_gsv_arrays' is not defined

When checking, I found out that all my objects defined in this worksheet 
had disappeared from memory. Since there was no error message, I am tapping 
in the dark. Any ideas? I'm suspecting some memory issues, but not sure how 
to check that. get_memory_usage() after the amnesia returns 1076.37, but I 
have no idea if this is an indication that my arrays are still stored 
somewhere and only the pointers are gone or if all is gone. 

Thanks for your help already!



-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Installation problem

2015-04-21 Thread Stan Schymanski
I faced the same problem when installing sage on a different computer and 
then copying my .sage folder from my original computer across. First I had 
a permission problem and when fixing this by chown -R newuser .sage, I got 
the Errno 39 as above. I found out that some symlinks didn't copy across 
(even when using rsync with pretty much preserve everything...), causing 
the Errno 39. These symlinks reside in .sage/sage_notebook.sagenb/home/ and 
after copying them over manually, the notebook starts again. I hope someone 
can give advice on how to properly migrate the .sage folder to a new 
computer properly without manual interaction.

On Monday, December 10, 2012 at 1:41:27 PM UTC+1, Emmanuel wrote:
>
> Good afternoon,
>
> Havin installed sage 5.4 on my Ubuntu distribution 12.10, I have no 
> problem to run sage in a terminal. However, I can no more run it on my 
> browser , apparently due to exceptions.OSError: [Errno 39] Directory not 
> empty (see below). If I delet the .sage directory in mu user directory, 
> then everything works fine but I have no more access to my old worksheets. 
> Can someone suggest an idea of what is happening?
>
> Executing twistd  --pidfile="sage_notebook.sagenb/sagenb.pid" -ny 
> "sage_notebook.sagenb/twistedconf.tac"
> 2012-12-10 13:30:52+0100 [-] Log opened.
> 2012-12-10 13:30:52+0100 [-] twistd 12.1.0 
> (/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/bin/python 
> 2.7.3) starting up.
> 2012-12-10 13:30:52+0100 [-] reactor class: 
> twisted.internet.epollreactor.EPollReactor.
> 2012-12-10 13:30:52+0100 [-] QuietSite starting on 8081
> 2012-12-10 13:30:52+0100 [-] Starting factory <__builtin__.QuietSite 
> instance at 0xad4636c>
> 2012-12-10 13:30:53+0100 [-] WSGI application error
> Traceback (most recent call last):
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/python/threadpool.py",
>  
> line 167, in _worker
> result = context.call(ctx, function, *args, **kwargs)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/python/context.py",
>  
> line 118, in callWithContext
> return self.currentContext().callWithContext(ctx, func, *args, **kw)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/python/context.py",
>  
> line 81, in callWithContext
> return func(*args,**kw)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/web/wsgi.py",
>  
> line 332, in run
> self.reactor.callFromThread(wsgiError, self.started, *exc_info())
> ---  ---
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/web/wsgi.py",
>  
> line 315, in run
> appIterator = self.application(self.environ, self.startResponse)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py",
>  
> line 1701, in __call__
> return self.wsgi_app(environ, start_response)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py",
>  
> line 1689, in wsgi_app
> response = self.make_response(self.handle_exception(e))
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py",
>  
> line 1687, in wsgi_app
> response = self.full_dispatch_request()
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py",
>  
> line 1360, in full_dispatch_request
> rv = self.handle_user_exception(e)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py",
>  
> line 1358, in full_dispatch_request
> rv = self.dispatch_request()
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py",
>  
> line 1344, in dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/devel/sagenb/flask_version/decorators.py",
>  
> line 22, in wrapper
> return f(*args, **kwds)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/devel/sagenb/flask_version/worksheet_listing.py",
>  
> line 68, in home
> return render_worksheet_list(request.args, pub=False, 
> username=username)
>   File 
> "/opt/sage-5.4-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/devel/sagenb/flask_version/worksheet_listing.py",
>  
> line 43, in render_worksheet_list
> search=search, reve

[sage-support] Re: Bug in solve?

2015-01-07 Thread Stan Schymanski
Only 2 years later, and I found a way around segmentation faults due to 
memory problems. It seems that my looping functions fill up memory over 
time and lead to segmentation faults at random stages. I now define such 
functions using the @fork decorator and then they don't seem to cause 
crashes any more (memory gets freed after each run). Just in case someone 
with a similar problem stumbles over this. 

On Friday, March 29, 2013 10:08:26 PM UTC+1, Stan Schymanski wrote:
>
> I just found out that adding an additional print command in fun_dynamics 
> makes the crash move to a different position. The last number printed was 
> 354 before, now it is 88 a lot further down the track. So it seems indeed 
> to be a matter of filling up memory, and not a particular combination of 
> numbers or a call of a particular function. This will make it very 
> difficult to troubleshoot, as simplifying the worksheet might make the 
> error go away. 
> I republished the slightly modified worksheet here, FYI:
> https://sagenb.kaist.ac.kr:8066/home/pub/60
> Any idea how to shed more light into this?
>
> Cheers
> Stan
>
> On Friday, March 29, 2013 6:23:27 PM UTC+1, kcrisman wrote:
>>
>>
>>
>> On Friday, March 29, 2013 12:39:48 PM UTC-4, Stan Schymanski wrote:
>>>
>>> Thanks for offering to look into it, kcrisman. 
>>> I wasn't able to isolate the error yet, but I uploaded a slightly 
>>> trimmed worksheet here:
>>> https://sagenb.kaist.ac.kr:8066/home/pub/59
>>> Contrary to my previous impression, this error is now reproducible, as 
>>> in it happens at the same point every time now. Maybe it is an error in my 
>>> code after all...
>>>
>>
>> You definitely use Maxima simplification a few times, but it doesn't 
>> appear to intersect with the code that is repeated so often (fun_dynamics 
>> etc.).  Hmm.  If you could try to remove a lot of that stuff it would be 
>> really helpful; that is a very impressively long worksheet! 
>>
>

-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] simplify_full and others disappeared in Sage 6.2??

2014-09-19 Thread Stan Schymanski
Is this just my computer, or has anyone else experienced this:

┌┐
│ Sage Version 6.2, Release Date: 2014-05-06 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
sage: simplify_full
---
NameError Traceback (most recent call last)
 in ()
> 1 simplify_full

NameError: name 'simplify_full' is not defined

Thanks for your help already!


-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Search function at sagemath.org broken?

2014-01-28 Thread Stan Schymanski

Awesome, thanks!

Stan

On 28/01/14 15:47, Harald Schilly wrote:

Interesting, seems to be a bug in google's javascript.
However, at the bottom is a direct link to the CSE, you can use it as 
a fallback

https://www.google.com/cse/home?cx=017384562579735769466:s27byrlaffu

Harald



On Wednesday, January 22, 2014 11:14:23 AM UTC+1, Stan Schymanski wrote:

Dear all,

I haven't bee able to use the search function at
http://www.sagemath.org/search.html
<http://www.sagemath.org/search.html> for a while. Whatever I type
into the search field, it always returns 0 results. Has anyone
experienced this problem, or is it just my browser? This is on FF
26.0 under Ubuntu.

Thanks for your help already!

--
You received this message because you are subscribed to a topic in the 
Google Groups "sage-support" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/sage-support/Z7_7y4d5fjU/unsubscribe.
To unsubscribe from this group and all its topics, 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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


--
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-support] Re: Search function at sagemath.org broken?

2014-01-27 Thread Stan Schymanski

Waiting... and waiting...

Still waiting...

Nope, waiting a few seconds does not do the trick for me, neither on 
Firefox nor Konqueror. Any other ideas?


On 22/01/14 12:40, The man in the hat wrote:

You have to wait a few seconds for the results to appear.

On Wednesday, January 22, 2014 11:14:23 AM UTC+1, Stan Schymanski wrote:

Dear all,

I haven't bee able to use the search function at
http://www.sagemath.org/search.html
<http://www.sagemath.org/search.html> for a while. Whatever I type
into the search field, it always returns 0 results. Has anyone
experienced this problem, or is it just my browser? This is on FF
26.0 under Ubuntu.

Thanks for your help already!

--
You received this message because you are subscribed to a topic in the 
Google Groups "sage-support" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/sage-support/Z7_7y4d5fjU/unsubscribe.
To unsubscribe from this group and all its topics, 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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


--
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-support] Search function at sagemath.org broken?

2014-01-22 Thread Stan Schymanski
Dear all, 

I haven't bee able to use the search function at 
http://www.sagemath.org/search.html for a while. Whatever I type into the 
search field, it always returns 0 results. Has anyone experienced this 
problem, or is it just my browser? This is on FF 26.0 under Ubuntu.

Thanks for your help already!

-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-support] Re: Save session IOError: [Errno 2]

2013-11-05 Thread Stan Schymanski
By the way, is there a possibility at all to save a session to a directory 
of choice, so that it can be re-loaded in a different worksheet? That would 
be very useful.

Cheers
Stan

On Friday, August 9, 2013 6:29:50 PM UTC+2, P Purkayastha wrote:
>
> On 08/09/2013 09:53 PM, Stan Schymanski wrote: 
> > I just stumbled over your post as I experienced the same error. There is 
> > actually a ticket for it here: http://trac.sagemath.org/ticket/9805 
> > 
> > It looks like a 5 minutes-job for someone familiar with creating 
> > patches, but unfortunately, nobody has touched it for 3 years now... 
> > Pity! 
> > 
> > Cheers 
> > Stan 
>
> There's a reason why it has not been fixed - the directory it writes to 
> is not a constant. It differs by account name, and by worksheet - I 
> don't see a way to get these at runtime. Although it gives an error, it 
> does save the object into the directory corresponding to the cell. 
>
> A workaround is to save it by yourself in the data directory by using 
>
> save_session(DATA + 'sage_session.sobj') 
>
> At least for now, you will get an error message but the session will be 
> saved alright. 
>
>
> > 
> > 
> > On Tuesday, December 25, 2012 10:04:09 AM UTC+1, dann wrote: 
> > 
> > Hi! 
> > 
> > When i try to evolute code 
> > 
> > a='qweqweq' 
> > save_session('tst') 
> > 
> > i get an error 
> > 
> > Traceback (most recent call last): 
> >File "", line 1, in  
> >File "_sage_input_2.py", line 10, in  
> >  exec compile(u'open("___code___.py","w").write("# -*- coding: 
> > utf-8 -*-\\n" + 
> > 
> _support_.preparse_worksheet_cell(base64.b64decode("YT0ncXdlcXdlcScKc2F2ZV9zZXNzaW9uKCd0c3QnKQ=="),globals())+"\\n");
>  
>
> > execfile(os.path.abspath("___code___.py")) 
> >File "", line 1, in  
> > 
> >File "/tmp/tmpLfbw46/___code___.py", line 3, in  
> >  exec compile(u"save_session('tst')" + '\n', '', 'single') 
> >File "", line 1, in  
> > 
> >File "session.pyx", line 304, in sage.misc.session.save_session 
> > (sage/misc/session.c:1710) 
> >File "sage_object.pyx", line 863, in 
> > sage.structure.sage_object.save (sage/structure/sage_object.c:9575) 
> > IOError: [Errno 2] No such file or directory: '../../data/tst.sobj' 
> > tst.sobj 
> > 
> > What's the problem? 
> > 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...@googlegroups.com . 
> > To post to this group, send email to 
> > sage-s...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/sage-support. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>
>
>

-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-support] Re: Save session IOError: [Errno 2]

2013-11-05 Thread Stan Schymanski
Awesome, thank you!
I can confirm that 
save_session(DATA + 'sage_session.sobj') 
and 
load_session(DATA + 'sage_session.sobj') 
works, despite reporting an error. I played around a little bit with 
passing custom paths, but the problem is that save_session always prepends 
'../../data/' to the path. Why not just remove this and ask the user to 
provide an explicit path? This would also reduce the clutter in the .sage 
directory.

Cheers
Stan


On Friday, August 9, 2013 6:29:50 PM UTC+2, P Purkayastha wrote:
>
> On 08/09/2013 09:53 PM, Stan Schymanski wrote: 
> > I just stumbled over your post as I experienced the same error. There is 
> > actually a ticket for it here: http://trac.sagemath.org/ticket/9805 
> > 
> > It looks like a 5 minutes-job for someone familiar with creating 
> > patches, but unfortunately, nobody has touched it for 3 years now... 
> > Pity! 
> > 
> > Cheers 
> > Stan 
>
> There's a reason why it has not been fixed - the directory it writes to 
> is not a constant. It differs by account name, and by worksheet - I 
> don't see a way to get these at runtime. Although it gives an error, it 
> does save the object into the directory corresponding to the cell. 
>
> A workaround is to save it by yourself in the data directory by using 
>
> save_session(DATA + 'sage_session.sobj') 
>
> At least for now, you will get an error message but the session will be 
> saved alright. 
>
>
> > 
> > 
> > On Tuesday, December 25, 2012 10:04:09 AM UTC+1, dann wrote: 
> > 
> > Hi! 
> > 
> > When i try to evolute code 
> > 
> > a='qweqweq' 
> > save_session('tst') 
> > 
> > i get an error 
> > 
> > Traceback (most recent call last): 
> >File "", line 1, in  
> >File "_sage_input_2.py", line 10, in  
> >  exec compile(u'open("___code___.py","w").write("# -*- coding: 
> > utf-8 -*-\\n" + 
> > 
> _support_.preparse_worksheet_cell(base64.b64decode("YT0ncXdlcXdlcScKc2F2ZV9zZXNzaW9uKCd0c3QnKQ=="),globals())+"\\n");
>  
>
> > execfile(os.path.abspath("___code___.py")) 
> >File "", line 1, in  
> > 
> >File "/tmp/tmpLfbw46/___code___.py", line 3, in  
> >  exec compile(u"save_session('tst')" + '\n', '', 'single') 
> >File "", line 1, in  
> > 
> >File "session.pyx", line 304, in sage.misc.session.save_session 
> > (sage/misc/session.c:1710) 
> >File "sage_object.pyx", line 863, in 
> > sage.structure.sage_object.save (sage/structure/sage_object.c:9575) 
> > IOError: [Errno 2] No such file or directory: '../../data/tst.sobj' 
> > tst.sobj 
> > 
> > What's the problem? 
> > 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...@googlegroups.com . 
> > To post to this group, send email to 
> > sage-s...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/sage-support. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>
>
>

-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-support] Re: Save session IOError: [Errno 2]

2013-08-09 Thread Stan Schymanski
I just stumbled over your post as I experienced the same error. There is 
actually a ticket for it here: http://trac.sagemath.org/ticket/9805

It looks like a 5 minutes-job for someone familiar with creating patches, 
but unfortunately, nobody has touched it for 3 years now...
Pity!

Cheers
Stan


On Tuesday, December 25, 2012 10:04:09 AM UTC+1, dann wrote:
>
> Hi!
>
> When i try to evolute code
>
> a='qweqweq'
> save_session('tst')
>
> i get an error
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "_sage_input_2.py", line 10, in 
> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 
> -*-\\n" + 
> _support_.preparse_worksheet_cell(base64.b64decode("YT0ncXdlcXdlcScKc2F2ZV9zZXNzaW9uKCd0c3QnKQ=="),globals())+"\\n");
>  
> execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in 
> 
>   File "/tmp/tmpLfbw46/___code___.py", line 3, in 
> exec compile(u"save_session('tst')" + '\n', '', 'single')
>   File "", line 1, in 
> 
>   File "session.pyx", line 304, in sage.misc.session.save_session 
> (sage/misc/session.c:1710)
>   File "sage_object.pyx", line 863, in sage.structure.sage_object.save 
> (sage/structure/sage_object.c:9575)
> IOError: [Errno 2] No such file or directory: '../../data/tst.sobj'
> tst.sobj
>
> What's the problem?
> 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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Bug in solve?

2013-03-29 Thread Stan Schymanski
I just found out that adding an additional print command in fun_dynamics 
makes the crash move to a different position. The last number printed was 
354 before, now it is 88 a lot further down the track. So it seems indeed 
to be a matter of filling up memory, and not a particular combination of 
numbers or a call of a particular function. This will make it very 
difficult to troubleshoot, as simplifying the worksheet might make the 
error go away. 
I republished the slightly modified worksheet here, FYI:
https://sagenb.kaist.ac.kr:8066/home/pub/60
Any idea how to shed more light into this?

Cheers
Stan

On Friday, March 29, 2013 6:23:27 PM UTC+1, kcrisman wrote:
>
>
>
> On Friday, March 29, 2013 12:39:48 PM UTC-4, Stan Schymanski wrote:
>>
>> Thanks for offering to look into it, kcrisman. 
>> I wasn't able to isolate the error yet, but I uploaded a slightly trimmed 
>> worksheet here:
>> https://sagenb.kaist.ac.kr:8066/home/pub/59
>> Contrary to my previous impression, this error is now reproducible, as in 
>> it happens at the same point every time now. Maybe it is an error in my 
>> code after all...
>>
>
> You definitely use Maxima simplification a few times, but it doesn't 
> appear to intersect with the code that is repeated so often (fun_dynamics 
> etc.).  Hmm.  If you could try to remove a lot of that stuff it would be 
> really helpful; that is a very impressively long worksheet! 
>

-- 
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 http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Bug in solve?

2013-03-29 Thread Stan Schymanski
Thanks for offering to look into it, kcrisman. 
I wasn't able to isolate the error yet, but I uploaded a slightly trimmed 
worksheet here:
https://sagenb.kaist.ac.kr:8066/home/pub/59
Contrary to my previous impression, this error is now reproducible, as in 
it happens at the same point every time now. Maybe it is an error in my 
code after all...

Cheers
Stan

On Friday, March 29, 2013 4:37:09 PM UTC+1, kcrisman wrote:
>
>
>
> On Friday, March 29, 2013 6:14:21 AM UTC-4, Stan Schymanski wrote:
>>
>> Using 5.8 in Ubuntu 12.10, I get the same segmentation fault message in a 
>> looping code without involving any solve() command. I am just using a 
>> series of equations to calculate different values of variables saved in a 
>> dictionary ("vdict") and substitute those in the next equations, e.g.: 
>> vdict[var1] = eq_var1.rhs().subs(vdict).
>> If I run the code for a long series of loops, eventually I get:
>>
>> ;;;
>> ;;; Detected access to protected memory, also kwown as 'bus or
>> segmentation fault'.
>> ;;; Jumping to the outermost toplevel prompt
>> ;;;
>>
>>
>> Does the .subs(vdict) command use maxima? How can I help debugging this?
>>
>
>
> This should only use Ginac/Pynac.  If you can post the code you are using 
> somewhere like pastebin, maybe one could look to see if Maxima is 
> implicitly used somewhere.  Do you ever use one of the simplification 
> commands? 
>

-- 
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 http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Bug in solve?

2013-03-29 Thread Stan Schymanski
Hi Jan,

I did compile from source on my local laptop. Here is what I got when 
trying sage -gdb:

 sage -gdb 
--
| Sage Version 5.8, Release Date: 2013-03-15 |
| Type "notebook()" for the browser-based notebook interface.|
| Type "help()" for help.|
--
The Sage installation tree has moved
from /home/sschyman/Programs/sage-5.8
  to /home/sschyman/Programs/sage
Updating various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done updating paths.
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/sschyman/Programs/sage/local/bin/python...done.
Python was not compiled with debug symbols (or it was stripped). Some 
functionality may not work (properly).
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: File 
"/home/sschyman/Programs/sage/local/lib64/libstdc++.so.6.0.16-gdb.py" 
auto-loading has been declined by your `auto-load safe-path' set to 
"$debugdir:$datadir/auto-load".

-- 
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 http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Bug in solve?

2013-03-29 Thread Stan Schymanski
Using 5.8 in Ubuntu 12.10, I get the same segmentation fault message in a 
looping code without involving any solve() command. I am just using a 
series of equations to calculate different values of variables saved in a 
dictionary ("vdict") and substitute those in the next equations, e.g.: 
vdict[var1] = eq_var1.rhs().subs(vdict).
If I run the code for a long series of loops, eventually I get:

;;;
;;; Detected access to protected memory, also kwown as 'bus or
segmentation fault'.
;;; Jumping to the outermost toplevel prompt
;;;


Does the .subs(vdict) command use maxima? How can I help debugging this?

Cheers,
Stan

On Sunday, February 24, 2013 10:03:19 AM UTC+1, Rolandb wrote:
>
> Hi,
>  
> Using 5.7 in Windows 64, I got the following message:
>  
> solution=solve([(a*x+b*y)*x*y/c==1,3*log(a + b + c) - 
> log(27*a*b*x*y)],x,y,solution_dict=True)
> for sol in solution: show(sol)
>  
>
> ;;;
> ;;; Detected access to protected memory, also kwown as 'bus or
> segmentation fault'.
> ;;; Jumping to the outermost toplevel prompt
> ;;;
>
>
> Roland
>

-- 
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 http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: prebuild sage v5.4.1, linux 32-bit: twistd get wrong pidfile name when starting notebook(dir=..)

2013-01-15 Thread Stan Schymanski
I just found the related bug report and added a workaround: 
https://github.com/sagemath/sagenb/issues/116

On Tuesday, January 15, 2013 11:23:24 AM UTC+1, Stan Schymanski wrote:
>
> This is still a problem in Sage 5.5, and on linux 64-bit. Have you found a 
> workaround?
>
> Cheers
> Stan
>
> On Friday, November 23, 2012 10:01:18 PM UTC+1, Andre, der Besonnene wrote:
>>
>> I'm trying to update to sage 5.4.1. When I start a notebook without a 
>> directory parameter, everything goes fine. But if I want to start a 
>> notebook with: 
>>
>> sage: notebook(directory="/home/sage/s/",interface='') 
>>
>> I get an error message. 
>>
>>  
>> Executing twistd  --pidfile="s/sagenb.pid" -ny "s.sagenb/twistedconf.tac" 
>>  /\/\/\/\/\/\ 
>> . 
>> 2012-11-23 21:31:23+0100 [-]   File 
>> "/opt/sage/sage-5.4.1-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/scripts/_twistd_unix.py",
>>  
>> line 293, in setupEnvironment 
>> 2012-11-23 21:31:23+0100 [-] f = open(pidfile,'wb') 
>> 2012-11-23 21:31:23+0100 [-] IOError: [Errno 2] No such file or 
>> directory: '/home/sage/s/sagenb.pid' 
>> . 
>>   /\/\/\/\/\ 
>>
>> There is indeed no file /./../s/sagenb.pid, because sage creates a 
>> directory /./../s.sagenb/ . 
>>
>> greetings/Liebe Grüße aus dem nebeligen Seewinkel 
>> Andre
>
>

-- 
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 group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: sage v5.4.1 linux 32bit, twistd error when starting notebook(dir=..)

2013-01-15 Thread Stan Schymanski
Confirmed on 5.4.1 and 5.5. I added it to the bug report.

On Tuesday, November 27, 2012 7:59:57 PM UTC+1, Jason Grout wrote:
>
> On 11/23/12 3:19 PM, Andre, der Besonnene wrote: 
> >   When I start a notebook without giving a directory parameter 
> > everything works fine. But when I try to add a directory parameter sage 
> > refuses to start a webinterface server: 
> > 
> > sage: notebook(directory="/home/sage/s",interface='') 
> > .. 
> > Executing twistd  --pidfile="s/sagenb.pid" -ny 
> "s.sagenb/twistedconf.tac" 
> > /\/\/\/\/\/\ 
> > 2012-11-23 21:31:23+0100 [-]   File 
> > 
> "/opt/sage/sage-5.4.1-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/scripts/_twistd_unix.py",
>  
>
> > line 293, in setupEnvironment 
> > 2012-11-23 21:31:23+0100 [-] f = open(pidfile,'wb') 
> > 2012-11-23 21:31:23+0100 [-] IOError: [Errno 2] No such file or 
> > directory: '/home/sage/s/sagenb.pid' 
> > .. 
> > 
> > I guess the pidfile should be 
> > /home/sage/s.sagenb/sagenb.pid, 
> > /\/\/\/\/\/\/\/\/\/\ 
> > 
> > Liebe Gr��e aus einen nebeligen Seewinkel, regards 
> > Andre 
>
> I've filed a bug here: https://github.com/sagemath/sagenb/issues/116. 
> Can anyone confirm this?  I don't have a copy of 5.4.1 up yet. 
>
> Thanks, 
>
> Jason 
>
>
>
>

-- 
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 group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: prebuild sage v5.4.1, linux 32-bit: twistd get wrong pidfile name when starting notebook(dir=..)

2013-01-15 Thread Stan Schymanski
This is still a problem in Sage 5.5, and on linux 64-bit. Have you found a 
workaround?

Cheers
Stan

On Friday, November 23, 2012 10:01:18 PM UTC+1, Andre, der Besonnene wrote:
>
> I'm trying to update to sage 5.4.1. When I start a notebook without a 
> directory parameter, everything goes fine. But if I want to start a 
> notebook with: 
>
> sage: notebook(directory="/home/sage/s/",interface='') 
>
> I get an error message. 
>
>  
> Executing twistd  --pidfile="s/sagenb.pid" -ny "s.sagenb/twistedconf.tac" 
>  /\/\/\/\/\/\ 
> . 
> 2012-11-23 21:31:23+0100 [-]   File 
> "/opt/sage/sage-5.4.1-linux-32bit-ubuntu_12.04.1_lts-i686-Linux/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/scripts/_twistd_unix.py",
>  
> line 293, in setupEnvironment 
> 2012-11-23 21:31:23+0100 [-] f = open(pidfile,'wb') 
> 2012-11-23 21:31:23+0100 [-] IOError: [Errno 2] No such file or directory: 
> '/home/sage/s/sagenb.pid' 
> . 
>   /\/\/\/\/\ 
>
> There is indeed no file /./../s/sagenb.pid, because sage creates a 
> directory /./../s.sagenb/ . 
>
> greetings/Liebe Grüße aus dem nebeligen Seewinkel 
> Andre

-- 
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 group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] suddenly, sage makes my firefox sluggish

2012-01-04 Thread Stan Schymanski
Dear all,

I haven't done anything other than running the regular Firefox
upgrades in Ubuntu 11.04 and now the notebook suddenly started slowing
down my Firefox. Has anybody else experienced this problem? Especially
when I double-click in a html-cell, it takes minutes before the text
appears in the editable cell and in the mean time FF is very reluctant
to do anything for me. This is on Ubuntu 11.04 64 bit, Kernel Linux
2.6.38-13-generic, Firefox 9.0.1 and both sage 4.7 and 4.7.2.

Thanks for your help!

Cheers
Stan

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-25 Thread Stan Schymanski
There is still a problem that Firefox displays a cached version of a
worksheet from back-when after re-opening, and then updates the
worksheet with this version if one clicks on "Evaluate All" before
clicking on "Reload" in Firefox. I've been bitten by this again and
again, loosing quite a few chunks of my work. There is a simple way to
make Firefox always update the cache automatically, which I thought
might be useful for others reading this thread. I took the below from
http://ticket.betterbuilt.com/KB/a26/how-to-force-firefox-to-reload-the-page-and-ignore-cache.aspx:

Type this into the address bar:
about:config
type this into the filter:
browser.cache.check_doc_frequency
change the value to: 1

more info:
3 - only check if it seems outdated
2 - always use cached version
1 - always check for newer version
0 - check for newer version once per session

On Oct 4, 4:55 pm, Stan Schymanski  wrote:
> Wow, it works! And I discovered another workaround. Ok, I deleted the
> last third of the worksheet and I was able to save the changes.
> Hooray! After evaluating a few cells, then clicking "Save and Quit",
> and reopening the worksheet, I got into the endless loop again.
> However, when I clicked on "Stop loading" and then the "Reload"
> button, the page loaded correctly.
>
> Thanks a lot!
> Stan
>

-- 
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: copy and paste of units?

2011-10-25 Thread Stan Schymanski
Thanks a lot, Keshav and Simon!

This would sound like a flaw in the design to me, if there was no way
to reconstruct a dictionary from its display form. In fact, it usually
works (also for lists, arrays etc.), just not with units, as their
input and display forms are different. I think that it would be useful
to have a way to recover the input form of anything that was
originally entered in textual form. Would it be possible to write a
function for it?

def input_form(obj):
return str(obj)+' = '+???

The reason why I need this is that I want to be able to easily and
transparently import a summary of the results from one worksheet into
another, in order to split up very long worksheets.

At the moment, I just do
sage: print 'udict = '+str(udict)

and then copy and past the output. It will work with Simon's trick,
but it should be easier.

Cheers
Stan



-- 
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] copy and paste of units?

2011-10-24 Thread Stan Schymanski
Dear all,

I am using a dictionary to store units of variables, such as

var('h_c')
udict = {}
udict[h_c] = E*units.energy.joule

However, whenever I display the dictionary, I only see:
{h_c: h_c*joule}

This means that I cannot copy and paste the dictionary into a new
worksheet, as it raises an error:
udict = {h_c: h_c*joule}

Traceback (click to the left of this block for traceback)
...
NameError: name 'joule' is not defined

Does anyone know how I can get around this error without re-typing the
whole dictionary and adding "units.xxx." in front of every single
unit?

Thanks for your help already!

Cheers
Stan

-- 
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: plots with logarithmic axis?

2011-10-21 Thread Stan Schymanski
Hi Jason,

Thanks for that! How ironic that it does not work for non-linear
functions!
I actually played around with p.matplotlib() before I found your
reply, but I haven't got it to plot anything. Is there a step I am
missing before I can import a plot() into pylab and manipulate it
there? That would be a great feature!

Stan

On Oct 13, 4:32 pm, Jason Grout  wrote:
> On 10/13/11 9:18 AM, Jason Grout wrote:
>
>
>
>
>
>
>
>
>
> > On 10/13/11 6:25 AM, Stan Schymanski wrote:
> >> Dear all,
>
> >> According to tickethttp://trac.sagemath.org/sage_trac/ticket/4529,
> >>http://trac.sagemath.org/sage_trac/ticket/1431shows a way how to use
> >>logarithmicaxes inplot(), but I am just not getting it. Could
> >> someone point me in the right direction or give a simple example for a
> >>plotwith the y-axis scaled logarithmically?
>
> > Do you want log *ticks* or a log *scale*? #1431 is about the tickmarks,
> > not the scale. So my last comment on #4529 seems to not be correct, at
> > least referring to what #1431 turned out to be in the end.
>
> > To change the scale, you can modify theplotafterwards, but I am
> > running into some sort of problem doing it:
>
> > sage: p=plot(e^x,(x,0,10))
> > sage: m=p.matplotlib()
> > sage: from matplotlib.backends.backend_agg import FigureCanvasAgg
> > sage: m.set_canvas(FigureCanvasAgg(m))
> > sage: m.gca().set_yscale('log')
> > sage: m.savefig('test.png')
>
> It seems something was wrong with theplotin the above example, or
> something.  Anyways, starting with:
>
> p=plot(x,(x,1,10))
>
> works fine.
>
> To do #4529, I'd suggest adding a keyword to show that defines the
> scales of the x and y axes.  I've added some comments to the ticket.
>
> Thanks,
>
> Jason

-- 
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] plots with logarithmic axis?

2011-10-13 Thread Stan Schymanski
Dear all,

According to ticket http://trac.sagemath.org/sage_trac/ticket/4529,
http://trac.sagemath.org/sage_trac/ticket/1431 shows a way how to use
logarithmic axes in plot(), but I am just not getting it. Could
someone point me in the right direction or give a simple example for a
plot with the y-axis scaled logarithmically?

Thanks heaps!
Stan

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
Wow, it works! And I discovered another workaround. Ok, I deleted the
last third of the worksheet and I was able to save the changes.
Hooray! After evaluating a few cells, then clicking "Save and Quit",
and reopening the worksheet, I got into the endless loop again.
However, when I clicked on "Stop loading" and then the "Reload"
button, the page loaded correctly.

Thanks a lot!
Stan

On Oct 4, 4:31 pm, Jason Grout  wrote:
> On 10/4/11 9:19 AM, Stan Schymanski wrote:
>
> > Well, here we get back to another unsolved problem, related to large
> > worksheets. I can't save changes when I click on "Edit".
>
> Even if you delete half (or more?) of the worksheet?
>
> Thanks,
>
> Jason

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
Well, here we get back to another unsolved problem, related to large
worksheets. I can't save changes when I click on "Edit".
But to answer your first question, no, it only seems to happen with
this worksheet and its predecessors.

Cheers
Stan

On Oct 4, 4:12 pm, Jason Grout  wrote:
> On 10/4/11 8:57 AM, Stan Schymanski wrote:
>
> > OK, the problem does not occur in Konqueror. Does this lead us
> > somewhere?
>
> Maybe it's a bug in jsmath with Firefox 7?  Does the problem only happen
> on this worksheet in FF7, or does it happen in other worksheets with
> latex equations in FF7?
>
> If it only happens on this worksheet, then it would be interesting to
> try to narrow down what in the worksheet is causing the apparent
> refreshes or whatever is going on.  Maybe you could do sort of a binary
> search in the worksheet---delete half of the worksheet and see if the
> problem goes away.  If it does, then replace with the other half.  If
> the problem still remains, delete half of the remaining cells.  (Do this
> in the "Edit" view so it's easy to select half of the worksheet and
> delete).  I guess this is assuming that you see the problem before
> evaluating any cells.
>
> Thanks,
>
> Jason

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
OK, the problem does not occur in Konqueror. Does this lead us
somewhere?

Thanks, Stan
>
> > Do you have this problem in other browsers?  It could be that FF 7 broke
> > something.
>
> > Thanks,
>
> > Jason

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
No, I didn't refresh the page at all. It just keeps repeating the png
GET requests. I'll try with Konqueror and report back.

Cheers
Stan

On Oct 4, 3:05 pm, Jason Grout  wrote:
> On 10/4/11 7:46 AM, Stan Schymanski wrote:
>
> > Sorry, I didn't include a large enough range. It seems that cell 648
> > is the culprit, as this one comes up again and again followed by the
> > same error message. I waited for 5 minutes now and got flooded with
> > messages, so I needed to shut down the notebook server before I could
> > copy and paste the error messages. Here is a section:
>
> This all looks pretty normal to me, and it looks like all of the png GET
> requests are repeated.  It looks like it is retrieving the plots for all
> the cells, and cell 648 is just the last cell.  Is this from you
> refreshing the page several times?
>
> Do you have this problem in other browsers?  It could be that FF 7 broke
> something.
>
> Thanks,
>
> Jason

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
] GET http://localhost:8000/home/admin/129/cells/648/sage0.png?1
[HTTP/1.1 304 Not Modified 153ms]
[14:39:16.544] Use of getAttributeNodeNS() is deprecated. Use
getAttributeNS() instead. @ http://localhost:8000/home/admin/129/

...

Here is the worksheet content of cell 648 and the adjacent cells:

{{{id=681|
P = plot(1/2*x/(x + 1),(x,0,10))
P += plot(1/2.5, (x,0,10), linestyle = '--')
P.axes_labels(['D2/D', 'D_I/D'])
P
///

}}}

Division of D by 2.5 is equivalent to a rectangular leaf where the
longer side is 4 times as long as the shorter side.

{{{id=655|
eq_h_c_Nu.subs(eq_Nu_free_Inc)
///
h_c == 3/200*(sqrt(25*(Gr*Pr)^(2/3) - 180*(Gr*Pr)^(7/12) +
324*sqrt(Gr*Pr)) + 5*(Gr*Pr)^(1/3) + 18*(Gr*Pr)^(1/4))*k_a/D
}}}

{{{id=648|
vw = 0.5
Ta = 300
Tl = Ta-10
Dmax = 0.1
P = plot(eq_H_lu.subs_expr(h_cu ==
eq_h_c_Nu.rhs().subs(eq_Nu_free_r_Inc).subs(eq_Gr).subs_expr(eq_nu_a,eq_a_a,eq_k_a).subs(cdict1)).subs_expr(Pr
== 0.72, T_a==Ta, T_l == Tl),(D, 0, Dmax), legend_label='$H_{lu}$')
P += plot(0.5*eq_Rll_n.rhs().subs(cdict1).subs(T_a = Ta,T_l = Tl),(D,
0, Dmax),color = 'green', legend_label='$R_{llu}$')
P.axes_labels(['$D_I$ (m)', 'Heat flux upper side (J m$^{-2}$ s
$^{-1}$ )'])
P
///

}}}

{{{id=652|
vw = 0.5
Ta = 300
Tl = Ta+10
Dmax = 0.1
P = plot(eq_H_lu.subs_expr(h_cu ==
eq_h_c_Nu.rhs().subs(eq_Nu_free_Inc).subs(eq_Gr).subs_expr(eq_nu_a,eq_a_a,eq_k_a).subs(cdict1)).subs_expr(Pr
== 0.72, T_a==Ta, T_l == Tl),(D, 0, Dmax), legend_label='$H_{lu}$')
P += plot(0.5*eq_Rll_n.rhs().subs(cdict1).subs(T_a = Ta,T_l = Tl),(D,
0, Dmax),color = 'green', legend_label='$R_{llu}$')
P.axes_labels(['$D$ (m)', 'Heat flux upper side (J m$^{-2}$ s
$^{-1}$ )'])
P
///

}}}



On Oct 4, 2:33 pm, Jason Grout  wrote:
> On 10/4/11 7:05 AM, Stan Schymanski wrote:
>
> > Error in parsing value for 'cursor'.
>
> That looks harmless:http://forums.mozillazine.org/viewtopic.php?t=505660
>
> It looks like you may have a large number of cells (at least 600?) as
> well as a lot of images that are loading.  Is it just an issue with not
> waiting long enough for the images to load?  Are there error or warning
> messages at the end of the log?  I notice that you've only pasted the
> first 7 seconds or so after opening the worksheet, while everything is
> still loading.
>
> Thanks,
>
> Jason

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
Here is the web console output when I click on "Save and Quit":

[14:01:28.812] Error in parsing value for 'filter'.  Declaration
dropped. @ 
http://localhost:8000/javascript/jqueryui/css/sage/jquery-ui-1.7.2.custom.css:18
[14:01:28.868] Unknown property 'zoom'.  Declaration dropped. @
http://localhost:8000/javascript/jqueryui/css/sage/jquery-ui-1.7.2.custom.css:285
[14:01:28.891] Error in parsing value for 'width'.  Declaration
dropped. @ http://localhost:8000/css/main.css:460
[14:01:28.924] Error in parsing value for 'filter'.  Declaration
dropped. @ http://localhost:8000/css/main.css:588
[14:01:28.934] Unknown property 'zoom'.  Declaration dropped. @
http://localhost:8000/css/main.css:938

And here is the output when I re-open the same worksheet:

--
[14:03:01.741] GET http://localhost:8000/css/main.css [HTTP/1.1 200 OK
2ms]
[14:03:01.762] GET http://localhost:8000/javascript/sage/main.js [HTTP/
1.1 200 OK 3ms]
[14:03:01.775] GET http://localhost:8000/javascript/sage/jsmath.js
[HTTP/1.1 200 OK 3ms]
[14:03:01.804] GET http://localhost:8000/home/admin/129/cells/6/sage0.png?1
[HTTP/1.1 200 OK 4ms]
[14:03:01.815] GET http://localhost:8000/home/admin/129/cells/68/sage0.png?1
[HTTP/1.1 200 OK 8ms]
[14:03:01.829] GET http://localhost:8000/home/admin/129/cells/451/sage0.png?1
[HTTP/1.1 200 OK 11ms]
[14:03:01.842] GET http://localhost:8000/home/admin/129/cells/15/sage0.png?1
[HTTP/1.1 200 OK 11ms]
[14:03:01.854] GET http://localhost:8000/home/admin/129/cells/16/sage0.png?1
[HTTP/1.1 200 OK 10ms]
[14:03:01.866] GET http://localhost:8000/home/admin/129/cells/25/sage0.png?1
[HTTP/1.1 200 OK 10ms]
[14:03:01.879] GET http://localhost:8000/home/admin/129/cells/455/sage0.png?1
[HTTP/1.1 200 OK 12ms]
[14:03:01.891] GET http://localhost:8000/home/admin/129/cells/653/sage0.png?1
[HTTP/1.1 200 OK 12ms]
[14:03:01.902] GET http://localhost:8000/home/admin/129/cells/342/sage0.png?1
[HTTP/1.1 200 OK 15ms]
[14:03:01.915] GET http://localhost:8000/home/admin/129/cells/461/sage0.png?1
[HTTP/1.1 200 OK 15ms]
[14:03:01.938] GET http://localhost:8000/home/admin/129/cells/344/sage0.png?1
[HTTP/1.1 200 OK 15ms]
[14:03:01.953] GET http://localhost:8000/home/admin/129/cells/475/sage0.png?1
[HTTP/1.1 200 OK 15ms]
[14:03:01.966] GET http://localhost:8000/home/admin/129/cells/477/sage0.png?1
[HTTP/1.1 200 OK 14ms]
[14:03:01.978] GET http://localhost:8000/home/admin/129/cells/484/sage0.png?1
[HTTP/1.1 200 OK 19ms]
[14:03:01.990] GET http://localhost:8000/home/admin/129/cells/493/sage0.png?1
[HTTP/1.1 200 OK 18ms]
[14:03:02.002] GET http://localhost:8000/home/admin/129/cells/486/sage0.png?1
[HTTP/1.1 200 OK 18ms]
[14:03:02.015] GET http://localhost:8000/home/admin/129/cells/487/sage0.png?1
[HTTP/1.1 200 OK 22ms]
[14:03:02.029] GET http://localhost:8000/home/admin/129/cells/358/sage0.png?1
[HTTP/1.1 200 OK 22ms]
[14:03:02.042] GET http://localhost:8000/home/admin/129/cells/489/sage0.png?1
[HTTP/1.1 200 OK 22ms]
[14:03:02.055] GET http://localhost:8000/home/admin/129/cells/498/sage0.png?1
[HTTP/1.1 200 OK 25ms]
[14:03:02.067] GET http://localhost:8000/home/admin/129/cells/496/sage0.png?1
[HTTP/1.1 200 OK 25ms]
[14:03:02.081] GET http://localhost:8000/home/admin/129/cells/517/sage0.png?1
[HTTP/1.1 200 OK 25ms]
[14:03:02.093] GET http://localhost:8000/home/admin/129/cells/570/sage0.png?1
[HTTP/1.1 200 OK 28ms]
[14:03:02.105] GET http://localhost:8000/home/admin/129/cells/589/sage0.png?1
[HTTP/1.1 200 OK 28ms]
[14:03:02.117] GET http://localhost:8000/home/admin/129/cells/601/sage0.png?1
[HTTP/1.1 200 OK 28ms]
[14:03:02.130] GET http://localhost:8000/home/admin/129/cells/614/sage0.png?1
[HTTP/1.1 200 OK 31ms]
[14:03:02.141] GET http://localhost:8000/home/admin/129/cells/577/sage0.png?1
[HTTP/1.1 200 OK 31ms]
[14:03:02.154] GET http://localhost:8000/home/admin/129/cells/583/sage0.png?1
[HTTP/1.1 200 OK 31ms]
[14:03:02.165] GET http://localhost:8000/home/admin/129/cells/643/sage0.png?1
[HTTP/1.1 200 OK 31ms]
[14:03:02.179] GET http://localhost:8000/home/admin/129/cells/648/sage0.png?1
[HTTP/1.1 200 OK 31ms]
[14:03:03.594] Use of getAttributeNode() is deprecated. Use
getAttribute() instead. @ http://localhost:8000/home/admin/129/
[14:03:03.923] GET http://localhost:8000/home/admin/129/alive?_=1317729782834
[HTTP/1.1 200 OK 1ms]
[14:03:04.508] GET http://localhost:8000/home/admin/129/cells/359/sage0.png?1
[HTTP/1.1 200 OK 2ms]
[14:03:04.523] GET http://localhost:8000/home/admin/129/cells/478/sage0.png?1
[HTTP/1.1 200 OK 2ms]
[14:03:04.550] GET http://localhost:8000/home/admin/129/cells/497/sage0.png?1
[HTTP/1.1 200 OK 4ms]
[14:03:04.564] GET http://localhost:8000/home/admin/129/cells/511/sage0.png?1
[HTTP/1.1 200 OK 4ms]
[14:03:04.584] GET http://localhost:8000/home/admin/129/cells/584/sage0.png?1
[HTTP/1.1 200 OK 2ms]
[14:03:04.602] GET http://localhost:8000/home/admin/129/cells/641/sage0.png?1
[HTTP/1.1 200 OK 2ms]
[14:03:04.635] Use of getAttributeNodeNS() is deprecated. Use
getAttributeNS() instead. @ http://localhost:8000/home/admin/129/
[14:03:0

[sage-support] Re: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
Thanks, Jason! I will work on it for a bit more and keep the web
console open to see if there are any error messages when the problem
re-occurs. At the moment, it looks as if the refresh button helped a
lot.

Cheers
Stan

On Oct 4, 1:48 pm, Jason Grout  wrote:

>
> Seehttps://developer.mozilla.org/en/Using_the_Web_Console
>
> If you want to send me the worksheet off-list (or post it somewhere if
> it's okay to post publicly), I can take a look at it.
>
> Thanks,
>
> Jason

-- 
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: severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
Thanks, Jason, for looking into this.

The worksheet has 3595 lines of text when I click on edit, and no
attached files. I am not sure what you mean by typesetting, but I have
not checked the "Typeset" box. I do, however, use quite a few latex
equations in the html cells, and have a lot of plots. Everything works
fine when I restart the server and the problem does not occur at the
same point every time. I just re-opened it again and tried to
reproduce the problem. Everything worked fine until I got to the place
I last edited, which was a series of plot commands. The plot was still
there, but my additions to the code were missing. So I added a couple
of them again (feeling like in Groundhog day), did "Save and Quit", re-
opened the worksheet and was in the "processing math" loop again. No
error message in the terminal where I started the notebook server
from.
Interestingly, I still had the text version of the worksheet open in a
text editor from before and my edits are there!!
I just restarted the notebook server again, opened the same worksheet
and scrolled to the cell where I made the changes previously. The
changes were gone again. Clicked on edit, searched for the cell there,
and the changes were there! Returned to worksheet, clicked on
"Refresh" and lo and behold, the code cell showed the changes made
previously. This is Firefox 7.01 on Ubuntu 11.04 64-bit. It looks like
Firefox has a local copy of the worksheet stored somewhere and when I
evaluate the cells in this local copy, the worksheet is updated with
this old code and things go haywire.

Where do I find the javascript console? Please excuse my ignorance!

Cheers
Stan

On Oct 4, 12:58 pm, Jason Grout  wrote:

> One of your comments about the error you were getting when you tried to
> edit the raw html of the worksheet seemed to indicate (IIRC) that it was
> abnormally large.  Can you tell us about the size of the worksheet, any
> attached data files, etc.?  Can you give us an indication of how much
> typesetting is involved?  Does all of the text appear (without being
> typeset)?  Can you see where on the page the typesetting stops, and can
> you post the relevant formulas here?  Does your worksheet work on
> test.sagenb.org (which has been upgraded to mathjax, as well as many
> other upgrades)?  Are there any javascript errors noted in the
> javascript console?
>
> Thanks,
>
> Jason

-- 
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] severe notebook problems - how to troubleshoot?

2011-10-04 Thread Stan Schymanski
Dear all,

I am having more and more trouble with a worksheet I have been working
on for the past few weeks, to the point that I can't work on it
properly any more, because changes are not saved and upon quitting and
reopening it gets into an infinite "Jsmath processing" loop. Only
restarting the notebook server allows me to work on it again, but then
some of my changes are usually lost. The problem is described in more
detail here:
http://groups.google.com/group/sage-notebook/browse_thread/thread/7e72cb922fac3e12/c907d7a1b2fa7b4b?lnk=gst&q=schymanski#c907d7a1b2fa7b4b

When googling a bit, I found that someone else had a similar problem
and never got a response:
http://groups.google.com/group/sage-support/browse_thread/thread/ee47acd5e31b62f8/ba3fdf8fc965811c?lnk=gst&q=worksheet#ba3fdf8fc965811c

Like in the above thread, I installed sage 4.7 and 4.7.1 on a 64-bit
Ubuntu (11.04), so maybe the problem is linked to this architecture? I
did sage -testall and got the following output:

The following tests failed:
sage -t  -force_lib "devel/sage/sage/sandpiles/sandpile.py" # Time
out
sage -t  -force_lib "devel/sage/sage/misc/sagedoc.py"
Total time for all tests: 6989.1 seconds

Could someone advice me what else I can do to troubleshoot the problem
further?

Thanks already for your help!

Stan

-- 
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: copy and paste of long expressions in worksheet?

2011-09-08 Thread Stan Schymanski
It helps a lot, thanks so much!

Stan

On Sep 8, 5:12 pm, Jason Grout  wrote:
> On 9/8/11 9:58 AM, Stan Schymanski wrote:
>
> > Dear all,
>
> > Is there a way to display a long expression in a way that can be
> > copied and pasted into a new cell in the worksheet or into another
> > worksheet? As in the example below, the output displayed in my browser
> > contains some line breaks that lead to an error message when pasted
> > into a new cell. Is there a way to avoid this? Currently, I have to
> > manually delete all added line breaks, which is a big hassle.
>
> If you click just to the left of the wrapped output, it should change to
> a non-wrapped version.  Clicking again to the left hides the output.
> One more click cycles back to the wrapped version.
>
> Does that help?
>
> Jason

-- 
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] copy and paste of long expressions in worksheet?

2011-09-08 Thread Stan Schymanski
Dear all,

Is there a way to display a long expression in a way that can be
copied and pasted into a new cell in the worksheet or into another
worksheet? As in the example below, the output displayed in my browser
contains some line breaks that lead to an error message when pasted
into a new cell. Is there a way to avoid this? Currently, I have to
manually delete all added line breaks, which is a big hassle.

Cheers
Stan

{{{id=114|
automatic_names(True)
///
}}}

{{{id=113|
f = sum(x^n for n in range(20))
f
///
x^19 + x^18 + x^17 + x^16 + x^15 + x^14 + x^13 + x^12 + x^11 + x^10 +
x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1
}}}

{{{id=112|
g = x^19 + x^18 + x^17 + x^16 + x^15 + x^14 + x^13 + x^12 + x^11 +
x^10 +
x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1
///
Traceback (most recent call last):
  ...
SyntaxError: invalid syntax
}}}

-- 
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: how to a copy of a nested list?

2011-08-19 Thread Stan Schymanski
Thanks a lot for the explanations. I like the example of windows or
connections; haven't thought of it from that perspective. It did take
me a long time to figure out what was happening here, so maybe the
above examples would be good in the documentation when the user is
introduced to lists. Not sure whether this should be in sage or in the
python documentation, but I have not found it anywhere.

Cheers
Stan

-- 
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: how to a copy of a nested list?

2011-08-18 Thread Stan Schymanski
Dear Robert,

Thanks a lot for your help, this is exactly what I wanted. I still
don't get why it is necessary to import a special function to perform
such a standard thing. "import copy" has the affect that suddenly I
cannot do copy(L) any more, but I have to do copy.copy(L) instead.
Since copy(L) does not do what I would expect anyway, I will avoid it.
Frankly, as intuitive as Python is in other respects, this behaviour
blows my mind.

Cheers
Stan

On Aug 17, 6:19 pm, Robert Bradshaw 
wrote:
> On Wed, Aug 17, 2011 at 9:09 AM, Stan Schymanski  wrote:
> > Dear all,
>
> > This has been driving me mad. According to the python documentation,
> > you can modify a copy of a list without modifying the original using
> > the following code:
>
> > sage: L = []
> > sage: M = L[:] # create a copy
> > sage: # modify L only
> > sage: L.append(1)
> > sage: M
> > []
>
> > Now, I want to do the same with a nested list, but I do not manage to
> > unlink the two. See the example below, where I also tried copy(L) to
> > no avail. I hope that someone can help. Thanks already!
>
> A "copy" of a list is a new list containing exactly the same elements
> as the original list. It sounds like what you want here is
>
> sage: import copy
> sage: L = [range(k) for k in range(5)]
> sage: M = copy.deepcopy(L)
> sage: M[0].append('something')
> sage: M
> [['something'], [0], [0, 1], [0, 1, 2], [0, 1, 2, 3]]
> sage: L
> [[], [0], [0, 1], [0, 1, 2], [0, 1, 2, 3]]
>
> - Robert

-- 
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] how to a copy of a nested list?

2011-08-17 Thread Stan Schymanski
Dear all,

This has been driving me mad. According to the python documentation,
you can modify a copy of a list without modifying the original using
the following code:

sage: L = []
sage: M = L[:] # create a copy
sage: # modify L only
sage: L.append(1)
sage: M
[]

Now, I want to do the same with a nested list, but I do not manage to
unlink the two. See the example below, where I also tried copy(L) to
no avail. I hope that someone can help. Thanks already!

THIS WORKS:
sage: L = [1,2,3]
sage: M = L[:] # create a copy
sage: # modify L only
sage: L[0]='rubbish'
sage: M
[1, 2, 3]

THIS DOES NOT:
sage: L = [[1,2,3],[4,5,6]]
sage: M = L[:] # create a copy
sage: # modify L only
sage: L[0][0]='rubbish'
sage: M
[['rubbish', 2, 3], [4, 5, 6]]

NOR DOES THIS:
sage: L = [[1,2,3],[4,5,6]]
sage: M = copy(L) # create a copy
sage: # modify L only
sage: L[0][0]='rubbish'
sage: M
[['rubbish', 2, 3], [4, 5, 6]]

-- 
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: subtraction of variables with same units should not make the unit disappear

2011-08-03 Thread Stan Schymanski
The problem is that you cannot check the units of your result in
general, as you have to make sure that the values you enter do not
lead to a cancellation. This is non-trivial for more complicated
expressions. I agree, it is not a bug in terms of coding but the
concept is not suitable for this purpose. Could you add your thoughts
to the sage-devel thread I started? It would be nice to add this
functionality to sage in one way or another.

Cheers
Stan

On Aug 2, 5:17 pm, Maarten Derickx 
wrote:
> I thought a bit longer about it, and I actually think it's not really a big
> bug. It think the way the units system is meant to be used is like this:
>
> sage: var("H_l, h_c,T_a,T_l")
> (H_l, h_c, T_a, T_l)
> sage:
> sol=solve([H_l*units.energy.calorie/units.length.centimeter^2/units.time.minute
> == h_c*((T_a - T_l)*units.temperature.kelvin)],h_c)
> sage: sol
> [h_c == H_l*calorie/(T_a*centimeter^2*kelvin*minute -
> T_l*centimeter^2*kelvin*minute)]
>
> The interpretation of this should be that 2*units.length.meter should be
> read as 2 * (1 meter) etc. This interpretation works very well if you have
> to convert explicit values. Note that you indeed cannot divide by 1 kelvin -
> 1 kelvin = 0 kelvin. The framework will give sensible answers if you fill in
> distinct values for T_a and T_l.
>
> sage: sol[0](T_l=1,T_a=2,H_l=3)
> h_c == 3*calorie/(centimeter^2*kelvin*minute)

-- 
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: subtraction of variables with same units should not make the unit disappear

2011-08-02 Thread Stan Schymanski
Thanks for the confirmation, Maarten! Using my brain is not an option
as it has very limited capacities when it comes to units...
As you point out, addition or subtraction of different units should
raise an error. I forwarded this to sage-devel here:
http://groups.google.com/group/sage-devel/browse_thread/thread/81884a53ab28212.
Hope that someone knows an easy way how to fix it.

Cheers
Stan

On Aug 2, 11:41 am, Maarten Derickx 
wrote:
> According to the 
> documentationhttp://www.sagemath.org/doc/reference/sage/symbolic/units.htmlthe
>  unit
> behave like elements from the symbolic ring, in which x-x will be replaced
> by 0. I considder this a bug since clearly you can add two elements only if
> the have the same unit, and the result will again have the same unit.
> Currently within sage there is not a neat workaround, I guess you just need
> to use your brain as you did in your "This works" example.

-- 
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] subtraction of variables with same units should not make the unit disappear

2011-07-29 Thread Stan Schymanski
Dear all,

I am not sure if I am using the units package correctly, but I have
the following problem:

I want to assign different units to variables, then get the units of
derived variables that are functions of others and check for
consistency at the end. Here is a simple example. I know the units of
H_l, T_a and T_l and want to know the units of h_c in H_l == h_c*(T_a
- T_l). For this, I create a dictionary udict with the units of the
variables I know, then I solve the equation for the unknown variable
and substitute the units for the known variables. However, subtraction
of two variables with the same units makes the units cancel out!!!
This is not very useful. Am I doing something wrong, or is this
desired behaviour? I hope there is an easy way around it. Thanks for
your help already!

sage: udict = {}
sage: udict[H_l] = units.energy.calorie/units.length.centimeter^2/
units.time.minute
sage: udict[T_a] = units.temperature.kelvin
sage: udict[T_l] = units.temperature.kelvin
sage: soln = solve(H_l == h_c*(T_a - T_l), h_c)[0]; soln
h_c == H_l/(T_a - T_l)
sage: soln.subs(udict)
Traceback (most recent call last):
...
RuntimeError: power::eval(): division by zero

---
This works:
sage: (H_l/T_a).subs(udict)
calorie/(centimeter^2*kelvin*minute)

-- 
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] list_plot does not plot numpy arrays any more

2011-07-12 Thread Stan Schymanski
Dear all,

since I upgraded from 4.6 to 4.7 (I also moved from a Mac to Ubuntu),
I cannot use a 1-D numpy array in list_plot any more. Is this
intended, or is it a bug? It breaks backwards compatibility and I
don't see the rationale behind it.

Here is an example (just copy and paste into a worksheet):

{{{id=4|
import numpy
///
}}}

{{{id=6|
data = numpy.array([1,4,5,3,3])
///
}}}

{{{id=8|
list_plot(list(data))
///

}}}

{{{id=3|
list_plot(data)
///
Traceback (most recent call last):
(...)
ValueError: The truth value of an array with more than one element is
ambiguous. Use a.any() or a.all()
}}}


Cheers
Stan

-- 
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] error in latex()

2010-09-14 Thread Stan Schymanski
Dear all,

I think that I found an annoying bug in latex. In a notebook cell,

automatic_names(True)
latex(exp((298*S_j - H_j)/(298*R_m)))

gives

e^{\left(\frac{-H_{j} - 298 \, S_{j}}{298 \, R_{m}}\right)}

The sign of 298 S_j is reversed!!

Actually, is there a way to latexify an expression before it is
evaluated by sage? I find that the ordering of expressions that sage
applies not very convenient for display at times.

Thanks for your help!

Cheers
Stan

-- 
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] Bad Request Maximum length of 102400 bytes exceeded.

2010-08-27 Thread Stan Schymanski
Dear all,

When trying to change the code of a worksheet in a text editor (using
the edit button in the worksheet), I get the following error message
whenever I want to save changes:

Bad Request
Maximum length of 102400 bytes exceeded.

Does anyone have an idea what could cause this and how this can be
circumvented?

Cheers
Stan

-- 
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: plotting an arrow in pylab

2010-08-27 Thread Stan Schymanski

Hi Jason,

Thanks for verifying this and sorry for the missing "import numpy" line. 
I will post it to the matplotlib list.


Cheers
Stan

On 8/26/10 4:43 PM, Jason Grout wrote:

On 8/26/10 9:16 AM, Jason Grout wrote:

On 8/26/10 8:04 AM, Stan Schymanski wrote:

import pylab
pylab.clf() # clear the figure first
fig = pylab.figure(1,figsize=(8,5))
ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5),
ylim=(-4,3))

t = numpy.arange(0.0, 5.0, 0.01)
s = numpy.cos(2*numpy.pi*t)
line, = ax.plot(t, s, lw=3, color='purple')
pylab.text(-0.5,3.2,'no data',ha='center')
pylab.annotate('',(-1,3.1),(0,3.1),va='center',ha='center',
arrowprops=dict(arrowstyle='<->'))
pylab.savefig('blah.png')



I can't reproduce this because your example gives me errors:



I imported numpy as well, and using plain ipython and matplotlib 1.0
(which is the version after the one included in Sage), I get the
attached figure.

If I change

pylab.annotate('',(-1,3.1),(0,3.1),va='center',ha='center',
arrowprops=dict(arrowstyle='<->'))

to

pylab.annotate('',(-1,3.0),(0,3.1),va='center',ha='center',
arrowprops=dict(arrowstyle='<->'))

then I see an arrow just under "no data".

So apparently the issue is with matplotlib, not Sage. Posting to the
matplotlib list sounds like the appropriate thing to do.

Thanks,

Jason




--
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] plotting an arrow in pylab

2010-08-26 Thread Stan Schymanski
Dear all,

I am not sure if this is a bug in pylab or sage, but I am not able to
plot an arrow outside of the plot area in a pylab plot any more. This
used to work:

import pylab
pylab.clf() # clear the figure first
fig = pylab.figure(1,figsize=(8,5))
ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5),
ylim=(-4,3))

t = numpy.arange(0.0, 5.0, 0.01)
s = numpy.cos(2*numpy.pi*t)
line, = ax.plot(t, s, lw=3, color='purple')
pylab.text(-0.5,3.2,'no data',ha='center')
pylab.annotate('',(-1,3.1),(0,3.1),va='center',ha='center',
arrowprops=dict(arrowstyle='<->'))
pylab.savefig('blah.png')

This used to plot an arrow under the text 'no data' but above the main
plot. Now this arror does not appear unless at least part of it is
within the plotting area. Change one of the '3.1' in the code above
to, say, 3.0 and the whole arrow is displayed. I hope someone knows
another way of achieving this. Thanks already!

Stan

-- 
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: undo function in notebook stuffed entirely

2010-08-16 Thread Stan Schymanski
I just found another related ticket, which is more akin to the problem
I described:
http://trac.sagemath.org/sage_trac/ticket/7579

Sorry about the noise, but it took me a while to find this ticket, so
I thought I'd better add it to this thread.

Cheers
Stan

On Jul 19, 12:27 am, Stan Schymanski  wrote:
> Yes, I thought it worked well after the 'wasted space' problem was
> solved, but I cannot tell for sure.
>
> Here is the ticket:http://trac.sagemath.org/sage_trac/ticket/8776
> Sorry, should have mentioned the ticket number in the first place.
>
> I don't know why you and others have the same revision several times
> while I have none, but I guess the effect is the same. You may as well
> have none. I hope this problem can be solved as soon as possible, as I
> am missing already the great feeling of safety I had about working in
> the notebook. No computer crash used to scare me, until now.
>
> Cheers,Stan
>
> On 16/07/10 23:20, kcrisman wrote:
>
> > I can confirm that in 4.4.4 ALL revisions (there were 11, including
> > some from '1 day ago') of a worksheet I am working on are identical to
> > the current revision, which they definitely should not be!
>
> > This isn't exactly the same asStan'sissue, but almost certainly
> > related.  Stan, can you post which ticket is related to this (you
> > mention one below)?
>
> > I agree that this is very bad.  I am pretty sure there was a time
> > where the 'wasted space' was fixed but this didn't happen, but that
> > may have been before the switch to the sagenb package.
>
> > - kcrisman
>
> > On Jul 16, 10:38 am,StanSchymanski  wrote:
> >> Dear all,
>
> >> There has been a post in April about problems with the undo function
> >> in the notebook and a ticket was created, but I have to report that
> >> the undo function is stuffed entirely both in sage 4.4.3 and 4.4.4.
> >> I just saved and closed a worksheet that was misbehaving and when I re-
> >> opened it, it was in the version of ages ago and the undo list is
> >> empty. The undo list is actually empty for the other notebooks as
> >> well, so I haven't only lost a day of work but I may be losing more.
> >> Is there a way to use the old notebook again, where it was working
> >> well, despite "wasting space"? This is a major regression in my eyes.
>
> >> Thanks for your help!
>
> >> Cheers,
> >>Stan

-- 
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: undo function in notebook stuffed entirely

2010-07-18 Thread Stan Schymanski
Yes, I thought it worked well after the 'wasted space' problem was 
solved, but I cannot tell for sure.


Here is the ticket: http://trac.sagemath.org/sage_trac/ticket/8776
Sorry, should have mentioned the ticket number in the first place.

I don't know why you and others have the same revision several times 
while I have none, but I guess the effect is the same. You may as well 
have none. I hope this problem can be solved as soon as possible, as I 
am missing already the great feeling of safety I had about working in 
the notebook. No computer crash used to scare me, until now.


Cheers,
Stan

On 16/07/10 23:20, kcrisman wrote:

I can confirm that in 4.4.4 ALL revisions (there were 11, including
some from '1 day ago') of a worksheet I am working on are identical to
the current revision, which they definitely should not be!

This isn't exactly the same as Stan's issue, but almost certainly
related.  Stan, can you post which ticket is related to this (you
mention one below)?

I agree that this is very bad.  I am pretty sure there was a time
where the 'wasted space' was fixed but this didn't happen, but that
may have been before the switch to the sagenb package.

- kcrisman

On Jul 16, 10:38 am, Stan Schymanski  wrote:

Dear all,

There has been a post in April about problems with the undo function
in the notebook and a ticket was created, but I have to report that
the undo function is stuffed entirely both in sage 4.4.3 and 4.4.4.
I just saved and closed a worksheet that was misbehaving and when I re-
opened it, it was in the version of ages ago and the undo list is
empty. The undo list is actually empty for the other notebooks as
well, so I haven't only lost a day of work but I may be losing more.
Is there a way to use the old notebook again, where it was working
well, despite "wasting space"? This is a major regression in my eyes.

Thanks for your help!

Cheers,
Stan





--
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] undo function in notebook stuffed entirely

2010-07-16 Thread Stan Schymanski
Dear all,

There has been a post in April about problems with the undo function
in the notebook and a ticket was created, but I have to report that
the undo function is stuffed entirely both in sage 4.4.3 and 4.4.4.
I just saved and closed a worksheet that was misbehaving and when I re-
opened it, it was in the version of ages ago and the undo list is
empty. The undo list is actually empty for the other notebooks as
well, so I haven't only lost a day of work but I may be losing more.
Is there a way to use the old notebook again, where it was working
well, despite "wasting space"? This is a major regression in my eyes.

Thanks for your help!

Cheers,
Stan

-- 
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: html.table() still leads to texttt error

2010-07-02 Thread Stan Schymanski

Replying to myself, for later reference:

I found a workaround, which consists of converting the numpy.float into 
a sage float. If I change the respective line to:


tabledata = [(fb_names[i], n(fb_values_10[i])) for i in [0..8]]

it will display the table just fine. The advantage is that one can also 
limit the number of digits to be displayed, e.g. n(fb_values_10[i], 
digits=3) for better readability.


I still think that the \texttt problem is a bug, but if no-one else is 
troubled by it, it's probably not worth creating a ticket.


Cheers
Stan


On 30/06/10 10:15, Stan Schymanski wrote:

Dear all,

As reported in
http://groups.google.com/group/sage-support/browse_thread/thread/b35dc4f890f48677/32bce5d080ef80d1?lnk=gst&q=texttt#32bce5d080ef80d1,
the control sequence \texttt leads to an error in Jsmath. This is
supposed to be solved in Sage 4.4, but when I use html.table() to
display numpy.array data in Sage 4.4.3, I still see the message
"Unknown control sequence '\texttt'" instead of the data.

Notebook code to reproduce:

{{{id=973|
import numpy as np
///
}}}

{{{id=971|
fb_names = ['lambdagf', 'wsgexp', 'lambdafac', 'wsexp', 'pc',
'rootdepth',
'mdstore', 'rgdepth', 'ncp']
fb_values_10 = np.array([  1.56162258e+03,  -7.96780914e-01,
1.47235942e+03,
 -4.19180237e-01,   2.78293356e-01,   1.65211304e+00,
  1.e+02,   1.e+00,   7.24037931e+03])
///
}}}

{{{id=974|
tabledata = [(fb_names[i], fb_values_10[i]) for i in [0..8]]
html.table(tabledata,header=False)
}}}

For some reason, if I replace in the last command the array
"tabledata" by copy and paste of the data contained in tabledata, the
\texttt is not preparsed any more and the display is correct. It seems
to be an error in the interpretation of the numpy.array data. This
worked without problems in sage 4.1. Any ideas how to fix this?

Thanks a lot,
Stan




--
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] html.table() still leads to texttt error

2010-06-30 Thread Stan Schymanski
Dear all,

As reported in
http://groups.google.com/group/sage-support/browse_thread/thread/b35dc4f890f48677/32bce5d080ef80d1?lnk=gst&q=texttt#32bce5d080ef80d1,
the control sequence \texttt leads to an error in Jsmath. This is
supposed to be solved in Sage 4.4, but when I use html.table() to
display numpy.array data in Sage 4.4.3, I still see the message
"Unknown control sequence '\texttt'" instead of the data.

Notebook code to reproduce:

{{{id=973|
import numpy as np
///
}}}

{{{id=971|
fb_names = ['lambdagf', 'wsgexp', 'lambdafac', 'wsexp', 'pc',
'rootdepth',
'mdstore', 'rgdepth', 'ncp']
fb_values_10 = np.array([  1.56162258e+03,  -7.96780914e-01,
1.47235942e+03,
-4.19180237e-01,   2.78293356e-01,   1.65211304e+00,
 1.e+02,   1.e+00,   7.24037931e+03])
///
}}}

{{{id=974|
tabledata = [(fb_names[i], fb_values_10[i]) for i in [0..8]]
html.table(tabledata,header=False)
}}}

For some reason, if I replace in the last command the array
"tabledata" by copy and paste of the data contained in tabledata, the
\texttt is not preparsed any more and the display is correct. It seems
to be an error in the interpretation of the numpy.array data. This
worked without problems in sage 4.1. Any ideas how to fix this?

Thanks a lot,
Stan

-- 
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


Re: [sage-support] Question on sage -upgrade

2010-02-09 Thread Stan Schymanski
I had a similar problem, in a directory where I had not applied any 
patches previously, so it seems like a problem with 4.3.2. I actually 
randomly answered no and yes, whichever allowed me to finish the 
upgrade. No problems so far, but I'd like to know what the possible 
consequences are, too. Otherwise, I'll just do a fresh install over 
night some time.


Stan

On 8/02/10 15:20, Simon King wrote:

Hi!

I just upgraded sage 4.3.1 to sage 4.3.2. In sage 4.3.1, there were a
couple of patches (from various tickets), but I went back to the
unpatched state, by hg_sage.update(originalversionnumber).

During the upgrade, I was notified that some of the patches seemed to
be previously applied, and was asked a question (that I did not
properly understand) on what to do with them. I answered by hitting
"return"; this happened twice.

The upgrade seemed to be successful. But I wonder: What effect would
different answers have had? Can I assume that I now have a clean sage
4.3.2, with which I can now work on tickets?

Cheers
Simon

   


--
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] accessing parts of expressions

2010-01-27 Thread Stan Schymanski
Dear all,

Before the switch to Pynac, it was possible to access parts of
expressions by indexing, e.g.
f = x^3 + 2*x^2 + 3*x
f[0]
x^3

Now I get the error message
TypeError: 'sage.symbolic.expression.Expression' object does not
support
indexing

Below, I pasted an example how Burcin wanted to implement indexing in
Pynac. Has this ever happened, or is there another way of accessing
parts of expressions? I am currently trying to extract the terms in
the exponent of an expression, but I don't know how to do it easily.

Thanks for your help!

Stan


On Mar 21 2009, 7:32 pm, Burcin Erocal  wrote:

>
> It's in pynac already:
>
> sage: var('x,y',ns=1)
> (x, y)
> sage: f = expand((1+x+1/y)^10)
> sage: f.nargs()
> 66
>
> I could hook this up to __len__ as well, since __getitem__ lets you
> accesspartsof the expression. E.g.,
>
> sage: f[0]
> x^10
> sage: f[1]
> 10*x^9
>
> Cheers,
> Burcin

-- 
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


Re: [sage-support] substitution in sums and multiplications

2010-01-26 Thread Stan Schymanski
Is there a reason why integers are treated so differently to variables? 
If, for example, 2 is replaced by a variable, everything works as expected:


h = (k1 + k2)*x
h.subs_expr(k1 + k2 == k3)

k3*x

I don't understand why g is expanded to

2*k1 + 2*k2

but h not to

x*k1 + x*k2


Is there no way to manipulate how an expression is transformed? It would 
be a nice feature.


Cheers
Stan

On 25/01/10 20:36, stefan wrote:

Hi Burcin,


thank you, so it won't work what I tried..

Thanks anyway.
STefan


On Monday 25 January 2010 05:41:42 pm Burcin Erocal wrote:
   

Hi Stefan,

On Mon, 25 Jan 2010 06:49:55 -0800 (PST)

Ichnich  wrote:
 

there seems to be a bug in substitute:

var('k1 k2 k3')
f = (k1+k2)^2
f.substitute(k1+k2==k3)

gives k3^2 as expected.

var('k1 k2 k3')
f = (k1+k2)*2
f.substitute(k1+k2==k3)

gives 2*k1 + 2*k2. The same happens for +2 instead of *2.
   

In your example, (k1 + k2) is not a subexpression of f, so there is
nothing to substitute.

sage: var('k1 k2 k3')
(k1, k2, k3)
sage: f = (k1+k2)*2
sage: f
2*k1 + 2*k2
sage: f.has(k1+k2)
False

 

Is there an alternative to do a substitution?
   

You can rephrase your substitution as k1 == k3 - k2:

sage: f.substitute(k1==k3-k2)
2*k3


Cheers,
Burcin
 
   


--
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


Re: [sage-support] Re: problem evaluating an integral

2010-01-20 Thread Stan Schymanski
I fell for this several times, and didn't see the error here, either. 
Could either the syntax be made consistent or the error message made 
more informative? Now that I think about it, I would probably prefer the 
latter, as it would not break any code and it does not seem logical to 
declare the free variable if there is only one free variable allowed...


Thoughts?

Stan

On 19/01/10 21:42, Jason Grout wrote:

jeff788 wrote:

I am trying to evaluate a definite integral using SAGE and am getting
some errors.  I have evaluated the same integrals using Mathematica
without a problem.  Here is the integral in question:

integral(0.29832198400/((13.12333*X + 1)^2*
(15.74667*X + 1)),(X,0.05,0.3))

I get the following error:

Inverse of zero divisor?

I then tried using the numerical_integral command:

numerical_integral(0.29832198400/((13.12333*X + 1)^2*
(15.74667*X + 1)),(X,0.05,0.3))

for which I get he following error:

TypeError: unable to simplify to float approximation



The syntax for numerical_integral is different than the syntax for 
integral (in particular, you don't specify the variable or the range 
in parentheses).  This works:



sage: var('X')
X
sage: numerical_integral(0.29832198400/((13.12333*X + 
1)^2*(15.74667*X + 1)),0.05,0.3)

(0.0033064907013495063, 3.6709421073472043e-17)

The first number is the result, the second is an error bound.

Thanks,

Jason



--
________

Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_

-- 
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


Re: [sage-support] Re: losing confidence in Sage notebooks

2009-12-09 Thread Stan Schymanski

William Stein wrote:
> I like this proposal.  In fact, it's basically what I just wrote
> above, and what I plan to implement, though the user interface should
> be more html-ish rather than latex-ish (i.e.,  and no
> backslashes).
>
> William
>
>   
Yes, I noticed that you wrote the answer to my proposal in parallel to 
my proposal. I look forward to using the labels. Together with the 
worksheet->pdf script the labels could get transformed to nice 
consecutive numbers in printed documents, where named labels aren't 
really useful.

Stan

-- 
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


Re: [sage-support] Re: losing confidence in Sage notebooks

2009-12-08 Thread Stan Schymanski
Robert Bradshaw wrote:
[SNIP]
> Making notebook IDs that are not simply consecutive  
> integers would solve nearly all of your issues above, and I think a  
> lot of people (myself included) would appreciate that. Either short  
> names or globally unique identifiers (or some combination of both)  
> would be a step forward.
>
>   
I remember an earlier discussion of this, which I think concluded that 
we want to keep the worksheet names independent of file system naming 
conventions. I would also be in favour of unique, static directory names 
that show up in the front end. The user could still add more descriptive 
names in addition to the directory names, but it would be nice if we 
could refer to other worksheets by their names.  The next step would be 
to create scripts that check any cross-references if a worksheet is 
re-named; probably not an easy task (?). And if we are at that, I would 
really appreciate a way of referring to particular cells in a worksheet 
by their labels (e.g. \ref{ws:mass_balance1, cell:dMdt}). Maybe a script 
that goes through a whole notebook and checks cross-references in all 
work sheets could then also convert such labels to consecutive numbers, 
similarly to LaTex (?).

Stan

-- 
____

Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_

-- 
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


Re: [sage-support] problem with sage -upgrade

2009-11-22 Thread Stan Schymanski
Thanks, William! Unfortunately, this did not solve the issue. I am still 
getting the message "TypeError: Unable to start maxima".

Stan

William Stein wrote:
> On Fri, Nov 20, 2009 at 1:58 AM, Stan Schymanski  wrote:
>   
>> Did the upgrade still work for you?
>> Mine ended normally, but if I start the notebook and want to do
>> something, I get the message that maxima could not be started. I'll have
>> to compile from source (again).
>> 
>
> Try forcing rebuilding of the maxima spkg.
>
>  sage -f maxima-5.19.1.p0
>
> William
>
>
>   
>> Cheers
>> Stan
>>
>> Minh Nguyen wrote:
>> 
>>> Hi Stan,
>>>
>>> On Thu, Nov 19, 2009 at 9:31 PM, Stan Schymanski  wrote:
>>>
>>>   
>>>> Dear all,
>>>>
>>>> I compiled sage 4.2 from source on my Macbook Pro with OSX 10.4.11 and
>>>> when I tried sage -upgrade, I was asked to enter a commit message. I
>>>> aborted (by typing :q) and the upgrade is continuing now, but this
>>>> does not seem normal. Did anyone else experience something similar?
>>>>
>>>> 
>>> Yes. I was asked to enter a commit message because the README file has
>>> changed. I suspect that the executable bits have changed. The README
>>> file should have no executable bits.
>>>
>>>
>>>   
>> --
>> 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
>> 
>
>
>
>   

-- 
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


Re: [sage-support] problem with sage -upgrade

2009-11-20 Thread Stan Schymanski
Did the upgrade still work for you?
Mine ended normally, but if I start the notebook and want to do 
something, I get the message that maxima could not be started. I'll have 
to compile from source (again). I just don't get it why the upgrade 
hardly ever works form me, while I hear from others that they have been 
doing it for years.

Cheers
Stan

Minh Nguyen wrote:
> Hi Stan,
>
> On Thu, Nov 19, 2009 at 9:31 PM, Stan Schymanski  wrote:
>   
>> Dear all,
>>
>> I compiled sage 4.2 from source on my Macbook Pro with OSX 10.4.11 and
>> when I tried sage -upgrade, I was asked to enter a commit message. I
>> aborted (by typing :q) and the upgrade is continuing now, but this
>> does not seem normal. Did anyone else experience something similar?
>> 
>
> Yes. I was asked to enter a commit message because the README file has
> changed. I suspect that the executable bits have changed. The README
> file should have no executable bits.
>
>   

-- 
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] problem with sage -upgrade

2009-11-19 Thread Stan Schymanski
Dear all,

I compiled sage 4.2 from source on my Macbook Pro with OSX 10.4.11 and
when I tried sage -upgrade, I was asked to enter a commit message. I
aborted (by typing :q) and the upgrade is continuing now, but this
does not seem normal. Did anyone else experience something similar?

Thanks for your help!

Cheers
Stan

-- 
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: New work sheet stopped working FireFox 3.5.4

2009-11-09 Thread Stan Schymanski

I just upgraded to FireFox 3.5.4 on OSX 4.11 and do not have this problem, so 
it seems to be a problem with VirtualBox. Hope this helps to narrow it down. 
Sorry I can't be of more help.

Cheers 
Stan



madison.mich...@gmail.com wrote:
> I am using Sage 4.2 in VirtualBox and FireFox 3.5.4.  The "New
> Worksheet" has stopped working.  It brings up a previous worksheet.
> On earlier versions of Sage I had the same problem, however then I
> fixed it by empting the trash.  The does not seem to work now.  Is
> there some way to reset the "New Worksheet" funcion?  I have tried
> reinstalling Sate 4.2 on Virtual box and then reloading my worksheets
> but that did not fix the problem  Thanks Mike
> >
>   


--~--~-~--~~~---~--~~
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: convertor Sage -> TeX -> PDF

2009-11-09 Thread Stan Schymanski

Hi Marik,

Thanks for that. For some reason, it does not work on the pdf I 
downloaded, but if I create a pdf myself, it works. The comment in the 
pdf could mention "right-click" to make it clearer. Great work! I hope 
this script will make it into sage some time!! It still produced a lot 
of error messages and formatting glitches with the worksheet I tried it 
on, but it is a good start.

Cheers
Stan

ma...@mendelu.cz wrote:
>
> On 6 lis, 16:05, Stan Schymanski  wrote:
>   
>> By the way, how do you get the attachment out of the pdf? I tried
>> clicking on the graphic, but couldn't find any fuseful options in Acrobat 8.
>>
>> 
>
> Right click - save embeded file to disk
> you can also use pdftk, se my previous messege in this thread.
>
> Robert
>
>
> >
>   



--~--~-~--~~~---~--~~
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: convertor Sage -> TeX -> PDF

2009-11-02 Thread Stan Schymanski

Dear Wilfried,

The tutorial looks great! How did you do the numbered head lines and the 
index? Is the sage worksheet itself published somewhere?

Cheers
Stan

Wilfried_Huss wrote:
>
> On 29 Okt., 12:44, "ma...@mendelu.cz"  wrote:
>   
>> Hello all, the conversion into PDF has been discussed several times
>> here.
>>
>> One option is to print into a PDF file. This is another possibility:
>>
>> I wrote for myself a simple converter from Sage worksheets to PDF via
>> PDF LaTeX
>> 
>
> Great, this is exactly what I need.
>
>   
>> You can see the outputs in the bulletted list 
>> athttp://user.mendelu.cz/marik/sage/
>> , for examplehttp://user.mendelu.cz/marik/sage/dr.pdf
>>
>> The initial version of the script is 
>> athttp://user.mendelu.cz/marik/sage/sage2tex
>> and is neither cleanly written nor clever too much, but still "better
>> than get a wire into your eye" - as we say in Czech :)
>>
>> For whom is this topic worth
>>
>> Feel free to use it or modify as you need.
>> 
>
> I have modified the skript a little bit. It now first builds a list of
> text-, input- and output
> cells, and then converts each sell to latex. This makes things much
> easier. I also
> added syntax highlighting for python, html and latex input cells, and
> if the output is not
> a tex formula it is put into a verbatim environment.
>
> The HTML-LaTeX conversion is still done by a bunch of regular
> expressions, so this
> will need some improvements. But it already works very well.
>
> You can find the new version of the script at:
>http://www.math.tugraz.at/~huss/sage/sws2tex.py
>
> And here are example outputs:
>http://www.math.tugraz.at/~huss/sage/sage_tutorium.pdf
>http://www.math.tugraz.at/~huss/sage/sws2pdf_test.pdf
>
> Would you agree to release your initial script under the GPL or an
> other Sage compatible
> licence? I hope this can be improved to a point where it could be
> included into Sage, for
> this it needs a proper licence.
>
> Cheers,
> Wilfried Huss
> >
>   


--~--~-~--~~~---~--~~
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: deprecation warnings related to matplotlibrc on sage 4.2

2009-10-29 Thread Stan Schymanski

Thanks, kcrisman and Jason, that worked.

Stan



kcrisman wrote:
> I think it's in home/sage/
> - kcrisman
>
> On Oct 28, 1:06 pm, Stan Schymanski  wrote:
>   
>> Thanks, Jason! Where do I find it? It's not in home nor in
>> home/.matplotlib/.
>>
>> Stan
>>
>>
>>
>> Jason Grout wrote:
>> 
>>> Stan Schymanski wrote:
>>>   
>>>> Dear all,
>>>> 
>>>> I noticed a lot of deprecation warnings related to matplotlibrc in the
>>>> terminal after running notebook() on sage 4.2 (see below). Are they a
>>>> reason to be concerned?
>>>> 
>>> If you have never touched your matplotlibrc, then it would be okay to
>>> delete it.  By default, Sage uses the matplotlib defaults.  The errors
>>> are from an old matplotlibrc which has deprecated options in it.
>>>   
>>> Thanks,
>>>   
>>> Jason
>>>   
> >
>   



--~--~-~--~~~---~--~~
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: deprecation warnings related to matplotlibrc on sage 4.2

2009-10-28 Thread Stan Schymanski

Thanks, Jason! Where do I find it? It's not in home nor in 
home/.matplotlib/.

Stan

Jason Grout wrote:
> Stan Schymanski wrote:
>   
>> Dear all,
>>
>> I noticed a lot of deprecation warnings related to matplotlibrc in the
>> terminal after running notebook() on sage 4.2 (see below). Are they a
>> reason to be concerned?
>>
>> 
>
> If you have never touched your matplotlibrc, then it would be okay to 
> delete it.  By default, Sage uses the matplotlib defaults.  The errors 
> are from an old matplotlibrc which has deprecated options in it.
>
> Thanks,
>
> Jason
>
>
>
>
> >
>   



--~--~-~--~~~---~--~~
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] deprecation warnings related to matplotlibrc on sage 4.2

2009-10-28 Thread Stan Schymanski

Dear all,

I noticed a lot of deprecation warnings related to matplotlibrc in the
terminal after running notebook() on sage 4.2 (see below). Are they a
reason to be concerned?

Cheers,
Stan

/Users/sschym/Downloads/Free/sage-4.2/local/lib/python2.6/site-
packages/twisted/persisted/sob.py:12: DeprecationWarning: the md5
module is deprecated; use hashlib instead
  import os, md5, sys
/Users/sschym/Downloads/Free/sage-4.2/local/lib/python2.6/site-
packages/matplotlib/__init__.py:681: UserWarning: legend.labelsep is
deprecated. Update your matplotlibrc to use legend.labelspacing
instead.
  warnings.warn('%s is deprecated. Update your matplotlibrc to use %s
instead.'% (key, _deprecated_ignore_map[key]))
/Users/sschym/Downloads/Free/sage-4.2/local/lib/python2.6/site-
packages/matplotlib/__init__.py:681: UserWarning: legend.pad is
deprecated. Update your matplotlibrc to use legend.borderpad instead.

and so on...
--~--~-~--~~~---~--~~
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: sage 4.1.2 MacOSX 10.4.11 set-up error

2009-10-20 Thread Stan Schymanski

I have an intel machine and got the following error message: An error 
occurred while installing gnutls-2.2.1.p4.

It could be that something went wrong when I copied the source code to a 
different directory before compiling, so I'll try it again in the 
directory where I untarred the original code. I already sent an email to 
devel about that, but so far no replies.

Cheers,
Stan

abaco68 wrote:
> Thanks for the suggestion,
> by the way I understand from you first message that you had troubles
> compiling from source on MacOSX 10.4.11,
> in case I decide to try it myself,
> is it a PowerPC machine?
> What kind of problem did you encounter?
>
> Regards
> Giovanni
>
> On Oct 20, 9:45 am, Stan Schymanski  wrote:
>   
>> Ah, sorry, I didn't see the PowerBook bit. I don't know what causes the
>> error, but if you don't want to wait for someone to solve the problem, I
>> would suggest to compile from source. This takes a few hours but usually
>> works well and I have been told that the self-compiled version even runs
>> faster.
>>
>> Stan
>>
>> abaco68 wrote:
>> 
>>> Dear Stan
>>>   
>>> I found it here, for instance:
>>>   
>>> http://mirror.switch.ch/mirror/sagemath/osx/index.html
>>>   
>>> but indeed only for PowerPC
>>>   
>>> Regards
>>>   
>>> Giovanni
>>>   
>>> On Oct 20, 8:32 am, Stan Schymanski  wrote:
>>>   
>>>> Dear Giovanni,
>>>> 
>>>> Could you tell me where you found a dmg for 10.4.11? I tried to compile
>>>> from source on my 10.4.11 box without success, then I tried to download
>>>> a binary instead, but only found binaries for 10.5 and 10.6.
>>>> 
>>>> Cheers,
>>>> Stan
>>>> 
>>>> abaco68 wrote:
>>>> 
>>>>> Hi
>>>>> I have installed sage 4.1.2 on a PowerBook 5.58 with MacOSX 10.4.11 a
>>>>> cording to
>>>>> the procedure detailed in the README.txt file.
>>>>> The first time I run sage it tries to initialize the installation but
>>>>> it fails with the error message
>>>>>  enclosed hereafter. I have tried twice to download the .dmg file,
>>>>> unpack it, copy the sage folder
>>>>> to my disk , then run sage and I always get the same error.
>>>>> I must add that the sage folder is copied to an external firewire disk
>>>>> to a folder that has
>>>>> the same permissions as the "/Applications" folder on the internal
>>>>> harddisk.
>>>>>   
>>>>> Thanks for any help / suggestion
>>>>>   
>>>>> Giovanni
>>>>>   
>>>>> Error mesage follows here:
>>>>>   
>>>>> ImportError   Traceback (most recent call
>>>>> last)
>>>>>   
>>>>> /Volumes/MyBookData385/Applications/sage/local/bin/ in 
>>>>> ()
>>>>>   
>>>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>>>> packages/sage/misc/preparser_ipython.py in ()
>>>>>   6
>>>>> ###
>>>>>   
>>>>>   7
>>>>> > 8 import sage.misc.interpreter
>>>>>   9
>>>>>  10 import preparser
>>>>>   
>>>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>>>> packages/sage/misc/interpreter.py in ()
>>>>> 100
>>>>> 101 import os
>>>>> --> 102 import log
>>>>> 103
>>>>> 104 import remote_file
>>>>>   
>>>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>>>> packages/sage/misc/log.py in ()
>>>>>  63
>>>>>  64 import interpreter
>>>>> ---> 65 import latex
>>>>>  66 import misc
>>>>>  67
>>>>>   
>>>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>>>> packages/sage/misc/latex.py in ()
>>>>>  40 import random
>>>>>  41
>>>>> ---> 42 from misc import tmp_dir

[sage-support] Re: sage 4.1.2 MacOSX 10.4.11 set-up error

2009-10-20 Thread Stan Schymanski

Ah, sorry, I didn't see the PowerBook bit. I don't know what causes the 
error, but if you don't want to wait for someone to solve the problem, I 
would suggest to compile from source. This takes a few hours but usually 
works well and I have been told that the self-compiled version even runs 
faster.

Stan

abaco68 wrote:
> Dear Stan
>
> I found it here, for instance:
>
> http://mirror.switch.ch/mirror/sagemath/osx/index.html
>
> but indeed only for PowerPC
>
> Regards
>
> Giovanni
>
> On Oct 20, 8:32 am, Stan Schymanski  wrote:
>   
>> Dear Giovanni,
>>
>> Could you tell me where you found a dmg for 10.4.11? I tried to compile
>> from source on my 10.4.11 box without success, then I tried to download
>> a binary instead, but only found binaries for 10.5 and 10.6.
>>
>> Cheers,
>> Stan
>>
>> abaco68 wrote:
>> 
>>> Hi
>>> I have installed sage 4.1.2 on a PowerBook 5.58 with MacOSX 10.4.11 a
>>> cording to
>>> the procedure detailed in the README.txt file.
>>> The first time I run sage it tries to initialize the installation but
>>> it fails with the error message
>>>  enclosed hereafter. I have tried twice to download the .dmg file,
>>> unpack it, copy the sage folder
>>> to my disk , then run sage and I always get the same error.
>>> I must add that the sage folder is copied to an external firewire disk
>>> to a folder that has
>>> the same permissions as the "/Applications" folder on the internal
>>> harddisk.
>>>   
>>> Thanks for any help / suggestion
>>>   
>>> Giovanni
>>>   
>>> Error mesage follows here:
>>>   
>>> ImportError   Traceback (most recent call
>>> last)
>>>   
>>> /Volumes/MyBookData385/Applications/sage/local/bin/ in 
>>> ()
>>>   
>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>> packages/sage/misc/preparser_ipython.py in ()
>>>   6
>>> ###
>>>   
>>>   7
>>> > 8 import sage.misc.interpreter
>>>   9
>>>  10 import preparser
>>>   
>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>> packages/sage/misc/interpreter.py in ()
>>> 100
>>> 101 import os
>>> --> 102 import log
>>> 103
>>> 104 import remote_file
>>>   
>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>> packages/sage/misc/log.py in ()
>>>  63
>>>  64 import interpreter
>>> ---> 65 import latex
>>>  66 import misc
>>>  67
>>>   
>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>> packages/sage/misc/latex.py in ()
>>>  40 import random
>>>  41
>>> ---> 42 from misc import tmp_dir, graphics_filename
>>>  43 import sage_eval
>>>  44 from sage.misc.misc import SAGE_DOC
>>>   
>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>> packages/sage/misc/misc.py in ()
>>>  26
>>>  27 import operator, os, stat, socket, sys, signal, time, weakref,
>>> resource, math
>>> ---> 28 import sage.misc.prandom as random
>>>  29
>>>  30 from banner import version, banner
>>>   
>>> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
>>> packages/sage/misc/prandom.py in ()
>>>  54 # setting seeds should only be done through
>>> sage.misc.randstate .
>>>   
>>>  55
>>> ---> 56 from sage.misc.randstate import current_randstate
>>>  57
>>>  58 def _pyrand():
>>>   
>>> ImportError: dlopen(/Volumes/MyBookData385/Applications/sage/local/lib/
>>> python2.6/site-packages/sage/misc/randstate.so, 2): Library not
>>> loaded: /home/wstein/screen/varro/build/sage-4.1.2/local/lib/libgmp.
>>> 3.dylib
>>>   Referenced from: /Volumes/MyBookData385/Applications/sage/local/lib//
>>> libcsage.dylib
>>>   Reason: no suitable image found.  Did find:
>>> /Volumes/MyBookData385/Applications/sage/local/lib//libgmp.
>>> 3.dylib: incompatible cpu-subtype
>>> WARNING: Failure executing code: 'import sage.misc.preparser_ipython;
>>> sa

[sage-support] Re: sage 4.1.2 MacOSX 10.4.11 set-up error

2009-10-19 Thread Stan Schymanski

Dear Giovanni,

Could you tell me where you found a dmg for 10.4.11? I tried to compile 
from source on my 10.4.11 box without success, then I tried to download 
a binary instead, but only found binaries for 10.5 and 10.6.

Cheers,
Stan

abaco68 wrote:
> Hi
> I have installed sage 4.1.2 on a PowerBook 5.58 with MacOSX 10.4.11 a
> cording to
> the procedure detailed in the README.txt file.
> The first time I run sage it tries to initialize the installation but
> it fails with the error message
>  enclosed hereafter. I have tried twice to download the .dmg file,
> unpack it, copy the sage folder
> to my disk , then run sage and I always get the same error.
> I must add that the sage folder is copied to an external firewire disk
> to a folder that has
> the same permissions as the "/Applications" folder on the internal
> harddisk.
>
> Thanks for any help / suggestion
>
> Giovanni
>
> Error mesage follows here:
>
>
>
> ImportError   Traceback (most recent call
> last)
>
> /Volumes/MyBookData385/Applications/sage/local/bin/ in 
> ()
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/preparser_ipython.py in ()
>   6
> ###
>
>   7
> > 8 import sage.misc.interpreter
>   9
>  10 import preparser
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/interpreter.py in ()
> 100
> 101 import os
> --> 102 import log
> 103
> 104 import remote_file
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/log.py in ()
>  63
>  64 import interpreter
> ---> 65 import latex
>  66 import misc
>  67
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/latex.py in ()
>  40 import random
>  41
> ---> 42 from misc import tmp_dir, graphics_filename
>  43 import sage_eval
>  44 from sage.misc.misc import SAGE_DOC
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/misc.py in ()
>  26
>  27 import operator, os, stat, socket, sys, signal, time, weakref,
> resource, math
> ---> 28 import sage.misc.prandom as random
>  29
>  30 from banner import version, banner
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/prandom.py in ()
>  54 # setting seeds should only be done through
> sage.misc.randstate .
>
>  55
> ---> 56 from sage.misc.randstate import current_randstate
>  57
>  58 def _pyrand():
>
> ImportError: dlopen(/Volumes/MyBookData385/Applications/sage/local/lib/
> python2.6/site-packages/sage/misc/randstate.so, 2): Library not
> loaded: /home/wstein/screen/varro/build/sage-4.1.2/local/lib/libgmp.
> 3.dylib
>   Referenced from: /Volumes/MyBookData385/Applications/sage/local/lib//
> libcsage.dylib
>   Reason: no suitable image found.  Did find:
> /Volumes/MyBookData385/Applications/sage/local/lib//libgmp.
> 3.dylib: incompatible cpu-subtype
> WARNING: Failure executing code: 'import sage.misc.preparser_ipython;
> sage.misc.preparser_ipython.magma_colon_equals=True'
> ---
> ImportError   Traceback (most recent call
> last)
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/IPython/ipmaker.pyc in force_import(modname)
>  64 reload(sys.modules[modname])
>  65 else:
> ---> 66 __import__(modname)
>  67
>  68
>
> /Volumes/MyBookData385/Applications/sage/local/bin/ipy_profile_sage.py
> in ()
>   1 import os
>   2 if 'SAGE_CLEAN' not in os.environ:
> > 3 import sage.misc.misc
>   4 from sage.misc.interpreter import preparser, _ip
>   5 preparser(True)
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/misc.py in ()
>  26
>  27 import operator, os, stat, socket, sys, signal, time, weakref,
> resource, math
> ---> 28 import sage.misc.prandom as random
>  29
>  30 from banner import version, banner
>
> /Volumes/MyBookData385/Applications/sage/local/lib/python2.6/site-
> packages/sage/misc/prandom.py in ()
>  54 # setting seeds should only be done through
> sage.misc.randstate .
>
>  55
> ---> 56 from sage.misc.randstate import current_randstate
>  57
>  58 def _pyrand():
>
> ImportError: dlopen(/Volumes/MyBookData385/Applications/sage/local/lib/
> python2.6/site-packages/sage/misc/randstate.so, 2): corrupt binary,
> library ordinal too big
> Error importing ipy_profile_sage - perhaps you should run %upgrade?
> WARNING: Loading of ipy_profile_sage failed.
>
> >
>   


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-supp

[sage-support] spam on sage-support and sage-devel

2009-09-29 Thread Stan Schymanski

Dear admins,

I have received several spam emails from sage-support and sage-devel 
within the past couple of hours. If I am not the only one, could someone 
please check whether there is a leak in the Google groups settings?

Cheers,
Stan

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Nummerical results

2009-09-03 Thread Stan Schymanski

I think that it would be good to include the N(expr) somewhere at the 
top of the tutorial. This might help others, as searching for 
"numerical" seems to me like a logical thing to do.

Stan

chuck_starchaser wrote:
> All I could find by searching for "numerical" was this:
> http://www.sagemath.org/doc/tutorial/tour_algebra.html#solving-equations-numerically
> which doesn't answer my question.
> I have a function,
> f(x)=6.283185307*(1.1-cos(0.008726646*x))
> f(48.0)
>
> Note that I used 6.28 instead of "2*pi", and 1.1 should be
> just 1.0; I was just trying to persuade Sage to give me just a number;
> but NOTHING seems to work. When I hit Evaluate, it spits out,
>
> -6.2831853070*cos(0.41887900800) + 6.28318531328319
>
> Now, I understand that some professors might want "exact" results; but
> what could possibly be the use of getting an answer like this? Is
> there some way to just get a simple, numerical answer?
> TIA
> (Sorry about my frustration showing)
>
> >
>   

-- 


Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Simplify an expression

2009-07-21 Thread Stan Schymanski

Hi Roland,

Would this help?

sage: var ('a b x1 x2 y1 y2')
(a, b, x1, x2, y1, y2)
sage: expression = (a*x1^2 + b*x2^2)*y1 + b*y2^2
sage: expression.subs_expr((a*x1^2 + b*x2^2) == 0)
b*y2^2

Stan

Rolandb wrote:
> Hi,
> How to simplify an expression if you have some known relations
> (equalities)? Example:
>
> relation: 0 = a*x1^2 + b*x2^2
> expression = (a*x1^2 + b*x2^2)*y1+b*y2^3
>
> Given the relation, the expression could be simplified to b*y2^2. But
> how in Sage?
> Tnx in advance. Rolandb
>
> >
>   


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: compatibility mode in sage 4.x?

2009-07-20 Thread Stan Schymanski

Thanks, Laurent. I figured that out, but it is quite tedious to have to 
go through each worksheet and change the soln[0][1] to soln[0].rhs(). 
There are other things that work differently now and of course there are 
new ways how to achieve the same results, which might be more elegant. 
However, I don't think this warrants confronting the user with the need 
to recode all her previous work. I remember an old thread where WAS and 
others expressed their concern for backwards compatibility and not 
breaking old code by upgrading to a new version, but this seems to have 
been abandoned for quicker progress, I suppose. Hence the need for at 
least a possibility to run the old versions in parallel with the new 
one, or a conversion tool for old notebooks.

Cheers
Stan

Laurent wrote:
> Stan Schymanski ha scritto:
>   
>> Hi Jason,
>>
>> I gave an example for what does not work here: 
>> http://groups.google.com/group/sage-support/browse_thread/thread/17c717e8bfbdd367/b2fdb60e1f33b43e#b2fdb60e1f33b43e
>>
>> Today I noticed that my old use of .subs(locals()) now leads to an 
>> error, too.
>>
>> I could try to copy the notebook to somewhere else, but I don't think 
>> this would avoid the "Unable to start maxima" error I am getting. It 
>> seems that the upgrade to 4.1. changed something that 3.4 was using, so 
>> 3.4 does not work any more. If I install 3.4 again, I suspect that this 
>> could break 4.1, so I would get myself into an awful mess, wouldn't I?
>>
>> Thanks for your help!
>>
>> Stan
>>   
>> 
> I don't know how to make work your old code on a new Sage, but here is 
> the way of working with Sage 4 :
>
> var('x y')
> soln = solve(y == x^3 -2, x)
> print soln
> print soln[1].right_hand_side()
>
> Sage's answer :
>
> [
> x == 1/2*(I*sqrt(3) - 1)*(y + 2)^(1/3),
> x == 1/2*(-I*sqrt(3) - 1)*(y + 2)^(1/3),
> x == (y + 2)^(1/3)
> ]
> 1/2*(-I*sqrt(3) - 1)*(y + 2)^(1/3)
>
>
> Have a good afternoon
> Laurent
>
>
> >
>   

-- 


Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: compatibility mode in sage 4.x?

2009-07-20 Thread Stan Schymanski

Hi Jason,

I gave an example for what does not work here: 
http://groups.google.com/group/sage-support/browse_thread/thread/17c717e8bfbdd367/b2fdb60e1f33b43e#b2fdb60e1f33b43e

Today I noticed that my old use of .subs(locals()) now leads to an 
error, too.

I could try to copy the notebook to somewhere else, but I don't think 
this would avoid the "Unable to start maxima" error I am getting. It 
seems that the upgrade to 4.1. changed something that 3.4 was using, so 
3.4 does not work any more. If I install 3.4 again, I suspect that this 
could break 4.1, so I would get myself into an awful mess, wouldn't I?

Thanks for your help!

Stan



Jason Grout wrote:
> Stan Schymanski wrote:
>   
>> Dear all,
>>
>> Since the upgrade to 4.x, most of my old worksheets don't work any
>> more and I wondered if there is a possibility to run sage 4.x in a
>> compatibility mode so that the old code would work again. I also have
>> an old install of 3.4.1 on my system, but for some reason it can't
>> open the Maxima engine, so I am pretty much stuffed with my old
>> worksheets. Does anyone know a way out? Uninstall sage 4.1 and do a
>> fresh compilation of 3.x??
>>
>> 
>
> What code doesn't work?  Can you give an few examples?
>
> If you need to run an older version, you don't need to uninstall 4.1. 
> You can tell Sage where your notebook directory is, so you can move your 
> notebook to a new directory (instead of the default in ~/.sage) and run 
> your old worksheets from the old version of Sage.
>
> Thanks,
>
> Jason
>
>
> >
>   


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] compatibility mode in sage 4.x?

2009-07-20 Thread Stan Schymanski

Dear all,

Since the upgrade to 4.x, most of my old worksheets don't work any
more and I wondered if there is a possibility to run sage 4.x in a
compatibility mode so that the old code would work again. I also have
an old install of 3.4.1 on my system, but for some reason it can't
open the Maxima engine, so I am pretty much stuffed with my old
worksheets. Does anyone know a way out? Uninstall sage 4.1 and do a
fresh compilation of 3.x??

Cheers,
Stan
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problem with list generation and substitutions

2009-07-07 Thread Stan Schymanski

Yes, that's right. I got confused. Thanks for the quick answer!

Stan




Robert Bradshaw wrote:
> On Jul 7, 2009, at 2:18 AM, Stan Schymanski wrote:
>
>   
>> Dear all,
>>
>> For some reason, I cannot generate lists of values using a symbolic
>> function any more, as the variable does not get substituted.
>> 
>
> Variables never get automatically substituted, you must explicitly  
> ask for it:
>
> sage: var('x')
> x
> sage: y = 2^x
> sage: xvals = srange(0,1,0.1)
> sage: [y.subs(x=x) for x in xvals]
> [1,
>   1.07177346253629,
>   1.14869835499704,
>   1.23114441334492,
>   1.31950791077289,
>   1.41421356237310,
>   1.51571656651040,
>   1.62450479271247,
>   1.74110112659225,
>   1.86606598307361]
> sage: [y.subs(x=t) for t in [0..10]]
> [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
>
>
>   
>> The first
>> example shows that the values do not get substituted for x, the second
>> example shows that this works if I type the function into the list
>> construction call. Does anyone understand what is going on and how I
>> can generate lists of values using predefined symbolic expressions?
>>
>> Thanks a lot!
>>
>> Cheers,
>> Stan
>>
>> --
>> | Sage Version 4.0.2, Release Date: 2009-06-18   |
>> | Type notebook() for the GUI, and license() for information.|
>> --
>> sage: var('x')
>> x
>> sage: y = 2^x
>> sage: xvals = srange(0,1,0.1)
>> sage: [y for x in xvals]
>> [2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x]
>> sage: [2^x for x in xvals]
>>
>> [1,
>>  1.07177346253629,
>>  1.14869835499704,
>>  1.23114441334492,
>>  1.31950791077289,
>>  1.41421356237310,
>>  1.51571656651040,
>>  1.62450479271247,
>>  1.74110112659225,
>>  1.86606598307361]
>> 
>
>
> >
>   


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] problem with list generation and substitutions

2009-07-07 Thread Stan Schymanski

Dear all,

For some reason, I cannot generate lists of values using a symbolic
function any more, as the variable does not get substituted. The first
example shows that the values do not get substituted for x, the second
example shows that this works if I type the function into the list
construction call. Does anyone understand what is going on and how I
can generate lists of values using predefined symbolic expressions?

Thanks a lot!

Cheers,
Stan

--
| Sage Version 4.0.2, Release Date: 2009-06-18   |
| Type notebook() for the GUI, and license() for information.|
--
sage: var('x')
x
sage: y = 2^x
sage: xvals = srange(0,1,0.1)
sage: [y for x in xvals]
[2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x, 2^x]
sage: [2^x for x in xvals]

[1,
 1.07177346253629,
 1.14869835499704,
 1.23114441334492,
 1.31950791077289,
 1.41421356237310,
 1.51571656651040,
 1.62450479271247,
 1.74110112659225,
 1.86606598307361]
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: trouble with solve()

2009-06-27 Thread Stan Schymanski

Thanks, but this does not help in this case:
--
| Sage Version 4.0.2, Release Date: 2009-06-18   |
| Type notebook() for the GUI, and license() for information.|
--
sage: var('x y n')
(x, y, n)
sage: assume(n,'real')
sage: solve(y == x^n,x)
---
TypeError Traceback (most recent call last)
...
TypeError: Computation failed since Maxima requested additional 
constraints (try the command 'assume(>0)' before integral or limit 
evaluation, for example):
Is n an integer?

This even happens in maxima. No matter what I assume for n, it is still 
possible that it is an integer, so maxima keeps asking. Only if I assume 
that it is indeed an integer, it will evaluate, but this assumption is 
wrong as n does not need to be an integer. So the assume() method allows 
passing the answer 'yes', but not the answer 'no' in this case.

Stan

Kjetil Halvorsen wrote:
> On Fri, Jun 26, 2009 at 07:11, Stan Schymanski wrote:
>   
>> Update:
>> In maxima, I simply have to answer 'no' to the question whether n is an
>> integer and I obtain the solution. How can I pass the 'no' to maxima
>> through sage??
>>
>> 
>
> Try to use assume() befotre the call to maxima?
>
>   
>> Stan
>>
>> Stan Schymanski wrote:
>> 
>>> Dear all,
>>>
>>> How can I get sage to solve a simple equation such as the one below?
>>>
>>> --
>>> | Sage Version 4.0.2, Release Date: 2009-06-18   |
>>> | Type notebook() for the GUI, and license() for information.|
>>> --
>>> sage: var('x y n')
>>> (x, y, n)
>>> sage: solve(y == x^n,x)
>>> ---
>>> TypeError Traceback (most recent call
>>> last)
>>> [...]
>>> TypeError: Computation failed since Maxima requested additional
>>> constraints (try the command 'assume(>0)' before integral or limit
>>> evaluation, for example):
>>> Is n an integer?
>>>
>>> MMA solves similar equation using inverse functions and spits out a
>>> warning, no matter whether n is an integer or not. I thought that
>>> Maxima would do the same as stated in the docu.
>>>
>>> Here is an excerpt from the Maxima 5_15 docu:
>>>
>>> "Let E be the expression and X be the variable. If E is linear in X
>>> then it is trivially solved for X. Otherwise if E is of the form A*X^N
>>> + B then the result is (-B/A)^1/N) times the N'th roots of unity."
>>>
>>> Is this a problem with the sage->maxima interface? I also wanted to
>>> try Sympy as suggested in another post, but Sympy does not seem to be
>>> included in the new version of sage any more. Am I misunderstanding
>>> something?
>>>
>>> Thanks for your help!
>>>
>>> Stan
>>>
>>>   
>> --
>> 
>>
>> Stan Schymanski
>> Scientist
>> Max Planck Institute for Biogeochemistry
>> Postfach 10 01 64
>> D-07701 Jena
>>
>> Phone: +49.3641.576264
>> Fax: +49.3641.577274
>> WWW: http://www.bgc-jena.mpg.de/~sschym
>>
>> Biospheric Theory and Modelling Group
>> http://www.bgc-jena.mpg.de/bgc-theory/
>> _
>>
>>
>> 
>
>
>
>   

-- 


Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: trouble with solve()

2009-06-26 Thread Stan Schymanski

Update:
In maxima, I simply have to answer 'no' to the question whether n is an 
integer and I obtain the solution. How can I pass the 'no' to maxima 
through sage??

Stan

Stan Schymanski wrote:
> Dear all,
>
> How can I get sage to solve a simple equation such as the one below?
>
> --
> | Sage Version 4.0.2, Release Date: 2009-06-18   |
> | Type notebook() for the GUI, and license() for information.|
> --
> sage: var('x y n')
> (x, y, n)
> sage: solve(y == x^n,x)
> ---
> TypeError Traceback (most recent call
> last)
> [...]
> TypeError: Computation failed since Maxima requested additional
> constraints (try the command 'assume(>0)' before integral or limit
> evaluation, for example):
> Is n an integer?
>
> MMA solves similar equation using inverse functions and spits out a
> warning, no matter whether n is an integer or not. I thought that
> Maxima would do the same as stated in the docu.
>
> Here is an excerpt from the Maxima 5_15 docu:
>
> "Let E be the expression and X be the variable. If E is linear in X
> then it is trivially solved for X. Otherwise if E is of the form A*X^N
> + B then the result is (-B/A)^1/N) times the N'th roots of unity."
>
> Is this a problem with the sage->maxima interface? I also wanted to
> try Sympy as suggested in another post, but Sympy does not seem to be
> included in the new version of sage any more. Am I misunderstanding
> something?
>
> Thanks for your help!
>
> Stan
>
> >
>   

-- 


Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] trouble with solve()

2009-06-26 Thread Stan Schymanski

Dear all,

How can I get sage to solve a simple equation such as the one below?

--
| Sage Version 4.0.2, Release Date: 2009-06-18   |
| Type notebook() for the GUI, and license() for information.|
--
sage: var('x y n')
(x, y, n)
sage: solve(y == x^n,x)
---
TypeError Traceback (most recent call
last)
[...]
TypeError: Computation failed since Maxima requested additional
constraints (try the command 'assume(>0)' before integral or limit
evaluation, for example):
Is n an integer?

MMA solves similar equation using inverse functions and spits out a
warning, no matter whether n is an integer or not. I thought that
Maxima would do the same as stated in the docu.

Here is an excerpt from the Maxima 5_15 docu:

"Let E be the expression and X be the variable. If E is linear in X
then it is trivially solved for X. Otherwise if E is of the form A*X^N
+ B then the result is (-B/A)^1/N) times the N'th roots of unity."

Is this a problem with the sage->maxima interface? I also wanted to
try Sympy as suggested in another post, but Sympy does not seem to be
included in the new version of sage any more. Am I misunderstanding
something?

Thanks for your help!

Stan

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] '_latex_' is read-only

2009-06-25 Thread Stan Schymanski

Dear all,

Since the upgrade to sage 4, I receive the following error message:

sage: var('hi kunsati delyui')
sage: hi._latex_ = lambda: 'h_i'  # Matric suction
head in layer i (=pcapvec)
sage: kunsati._latex_ = lambda: 'K_{unsat,i}' # Unsaturated
hydraulic conductivity in layer i
sage: delyui._latex_ = lambda: '\delta_{yu,i}'# Soil layer
thickness in layer i
Traceback (most recent call last):
...
AttributeError: 'sage.symbolic.expression.Expression' object attribute
'_latex_' is read-only

Is there a way of doing this in latex 4.0x? Can I unprotect _latex_
somehow?

Thanks for your help,

Stan
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Dimensional Analysis or Unit Conversion capability?

2009-06-12 Thread Stan Schymanski

Maurizio wrote:
>
> All the other people involved, and interested in a unit package,
> please show just to say "hi"
>
>   
I'm very interested in a unit conversion package and I've been following 
the discussion with eager anticipation of something useful being 
implemented. Unfortunately, I can't contribute anything other than bug 
reports once something is implemented.

Good luck!

Stan

-- 
________

Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: New symbolic bug?

2009-06-12 Thread Stan Schymanski

I had the same question previously, but unfortunately, it passed below 
the radars, so I am glad Mauricio's post got picked up. The problem is 
that the dict() command automatically converts the variable names to 
strings, so the new symbolics can't be used in combination with dict(). 
Hope it can be fixed soon, as this breaks quite a few of my notebooks.

Cheers,
Stan

Maurizio wrote:
> Good point!
>
> Honestly, I didn't catch I could use a symbolic variable as the left
> hand side of the definition of an element in a dictionary, I thought
> that should have always been a string
>
> I don't know whether this has to be added in trac, and if so, where (I
> imagine this should be related to new symbolic, or coercion or stuff
> like that)
>
> Thanks a lot
>
> Regards
>
> Maurizio
>
>   
>> Not sure, if it's not already onhttp://trac.sagemath.org/sage_trac/ 
>> it should be. Probably due to the new symbolics. What you can do is  
>> make your dictionary cicco = {x: 10}. Making strings work shouldn't  
>> be too hard, that's what the a.subs(x=10) needs to handle.
>>
>> - Robert
>> 
> >
>   

-- 


Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] code breakage due to upgrade to sage 4.0

2009-06-08 Thread Stan Schymanski

Dear all,

I noticed that some of my old code does not work any more with sage
4.0.
I used to assign the solutions of equations by referring to them in
the following way:

--
| Sage Version 4.0, Release Date: 2009-05-29 |
| Type notebook() for the GUI, and license() for information.|
--
sage: var('x y')
(x, y)
sage: soln = solve(y == x^3 -2, x)
sage: x1 = soln[0][2]
---
TypeError Traceback (most recent call
last)

/Users/sschym/ in ()

TypeError: 'sage.symbolic.expression.Expression' object is unindexable

This works now:
sage: x1 = soln[0].rhs()
sage: x1
1/2*(I*sqrt(3) - 1)*(y + 2)^(1/3)

Is there a way to make soln[0][2] work again? Otherwise I would have
to change most of my notebooks!

Another issue is that the substitute command now expects dictionary
entries without quotations, so that my previous use of the subs
command does not work any more:

sage: pars = dict(y=2)
sage: pars
{'y': 2}
sage: x1.subs(pars)
---
TypeError Traceback (most recent call
last)
...

This works now:

sage: x1.subs({y:2})
1/2*(I*sqrt(3) - 1)*4^(1/3)

Is there an easy way of getting my old notebooks to work with Sage
4.0? Is there an easy way to create dictionaries without the
quotations for use in subs()??

Thanks for your help!

Stan


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: importing double precision numbers with 'D' descriptor

2009-06-05 Thread Stan Schymanski

Dear Robert,

Thanks a lot for the quick answer. This should work. However, I think it 
would be nice to have a pre-parser that converts all sorts of number 
formats into python ones so that mixing different packages  for 
different tasks would be easier. But I suppose this should be discussed 
in another thread (?).

Cheers
Stan

Robert Bradshaw wrote:
> On Jun 5, 2009, at 3:09 AM, Stan Schymanski wrote:
>
>   
>> Dear all,
>>
>> In Fortran, numbers can be written in the form of e.g. 1.2d-6 instead
>> of 1.2e-6, but if I import a text file with such numbers into sage
>> using numpy, the 'd' notation does not get recognised and I get an
>> error. Is there a way to import such numbers without too much hassle?
>>
>> Thanks for your help!
>> 
>
> That would require changing the preparser, and as Python doesn't  
> accept numbers of this format, I don't know that we'd want to depart  
> from that.
>
> If your text file is all numbers, you could do a replace.
>
> sage: s = "1d2 1.5d4 3.2d-100"
> sage: s.replace('d', 'e')
> '1e2 1.5e4 3.2e-100'
>
> - Robert
>
>
> >
>   

-- 


Stan Schymanski
Scientist
Max Planck Institute for Biogeochemistry
Postfach 10 01 64
D-07701 Jena

Phone: +49.3641.576264
Fax: +49.3641.577274
WWW: http://www.bgc-jena.mpg.de/~sschym

Biospheric Theory and Modelling Group
http://www.bgc-jena.mpg.de/bgc-theory/
_


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] importing double precision numbers with 'D' descriptor

2009-06-05 Thread Stan Schymanski

Dear all,

In Fortran, numbers can be written in the form of e.g. 1.2d-6 instead
of 1.2e-6, but if I import a text file with such numbers into sage
using numpy, the 'd' notation does not get recognised and I get an
error. Is there a way to import such numbers without too much hassle?

Thanks for your help!

Regards,
Stan
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



  1   2   3   >