[sage-support] Re: serious usability problem with unsaved notebooks
On 15 mei, 01:13, Tom tmb...@gmail.com wrote: I keep getting notebooks that are messed up: text and formulas have been randomly moved around and some are missing. I think this happens when closing the Sage notebook without either saving or discarding the changes. I haven't changed any of the default settings. Unfortunately, quitting out of Sage without properly saving happens fairly frequently, and it is extremely annoying to lose not just the unsaved changes, but to end up with a completely messed up notebook that may take as long to put in order again as it took to write originally. Is there any way I can avoid these problems? Is there any solution on the horizon? The current situation really makes Sage feel very flaky and unreliable, and it makes me reluctant to rely on it or the integrity of results that come out of it, since I can never tell whether a notebook really is up to date and correct. At the very least, there should be a warning when users try to close a page containing an unsaved notebook, and there should be another warning if a notebook that wasn't properly closed is opened again. Tom Dear Tom, I sincerely support your urgent request. In the past I have indicated this annoying Sage habit more than once. There is a log facility, but to repair a scrambled notebook file is much work, and often not worth the effort. I suggest for instance an user set option which ensures 15 minutes safe of a *.txt file (not *.sws!). Or maybe %safe per cell and %autosafe for the whole notebook are a way forward. With these options, I'm (as user) fully aware what is essential to save extra (to avoid new memory problems et cetera). The save location should be as safe as possible, of course. Maybe version 4.7.1 will be improved I keep my fingers crossed. Roland -- 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] operations with images
Both Maple and Mathematica allow the user to move around within plots - zooming and translating (and rotating in 3-d). Is there any such functionality with Sage plots? I have already noted that one can use a mouse to rotate 3-d plots. Secondly, is it possible to include Sage generated plots in HTML pages on the fly? I don't know how plots are encoded, so what the output is that we can direct it into something which will translate this encryption into an image. (Is this not what JMOL does with 3-d images?) Maybe I do not understand what exactly is happening when I view a plot here - can you help me out and maybe direct me to the appropriate passages in the manual. Thx. -- 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: error by using cython in the notebook
Im using a MacBook pro Intel Core 2 Duo and the Sage version is: 'Sage Version 4.6, Release Date: 2010-10-30' Thanks Ed On 15 Mai, 07:59, Marshall Hampton hampto...@gmail.com wrote: That example compiles fine for me on OS X 10.6. What version of Sage are you using and on what architecture? -M. Hampton On May 14, 1:35 am, eduardo eocamp...@gmail.com wrote: thanks for the answer! I think is not about the example, because i've tried some other examples and the result is the same (what do you think about the line with ...mach-o, but wrong architecture... here is the example i have tried to compile, it is the integration example: http://docs.cython.org/src/quickstart/build.html thanks again! Eduardo On 13 Mai, 16:11, MarshallHamptonhampto...@gmail.com wrote: Its not clear to me exactly what example you are trying to execute. Can you give the cython code you are trying to compile? -M.Hampton On May 11, 10:40 am, eduardo eocamp...@gmail.com wrote: hi guys, when i was trying see how does the integrate cython example (in the cython tutorial) work, I got the following error : Traceback (most recent call last): def integrate(double a, double b, int N): File , line 1, in module File /Applications/sage/devel/sagenb/sagenb/misc/support.py, line 519, in cython_import_all create_local_c_file=create_local_c_file) File /Applications/sage/devel/sagenb/sagenb/misc/support.py, line 498, in cython_import return __builtin__.__import__(name)ImportError: dlopen(/Users/eocampo/.sage//temp/ocampo.exp_math.uni_essen.de/11879//spyx//_Users_eocampo__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx/_Users_eocampo__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx_0.so, 2): no suitable image found. Did find: /Users/eocampo/.sage//temp/ocampo.exp_math.uni_essen.de/11879//spyx// _Users_eocampo__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx/ _Users_eocampo__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx_0.so: mach-o, but wrong architecture __Users_eo..._1_code_sage2_spyx.c __Users_eo...code_sage2_spyx.html what should be the problem? regards Eduardo -- 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: identify type of input expression
True. But the conditional sage: A=x+x^2 sage: if A.operator()==built-in function add: sage: print Y sage: else: sage: print N fails to give Y. How can I patch this up? On May 15, 1:57 am, Jason Grout jason-s...@creativetrax.com wrote: On 5/14/11 8:32 PM, MathLynx wrote: How can I use Sage to determine if an expression is a sum - i.e. if the last operation performed is either addition or subtraction? Thus, I would like to identify a*(b+c) as a product but a*b+a*c as a sum. It would be nice to also identify the number of summands in an addition - or multiplicands in a product - i.e. a*b+a*c should be a sum with two summands, as opposed to a*b+a*c+a*d having three summands. You can use operands() and operator() to do these things: sage: var('a,b,c,d') (a, b, c, d) sage: f=a*b+a*c+a*d sage: f.operands() [a*b, a*c, a*d] sage: f.operator() built-in function add sage: g=a*(b+c) sage: g.operands() [b + c, a] sage: g.operator() built-in function mul 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
Re: [sage-support] Re: identify type of input expression
The problem is that you're comparing A's operator with a string, so it'll evaluate to False. Maybe what you're trying is something like this: if A.operator() == operator.add: I don't know if it's the right way to do what you want, but should work. On Sun, May 15, 2011 at 3:28 PM, MathLynx mathl...@gmail.com wrote: True. But the conditional sage: A=x+x^2 sage: if A.operator()==built-in function add: sage: print Y sage: else: sage: print N fails to give Y. How can I patch this up? On May 15, 1:57 am, Jason Grout jason-s...@creativetrax.com wrote: On 5/14/11 8:32 PM, MathLynx wrote: How can I use Sage to determine if an expression is a sum - i.e. if the last operation performed is either addition or subtraction? Thus, I would like to identify a*(b+c) as a product but a*b+a*c as a sum. It would be nice to also identify the number of summands in an addition - or multiplicands in a product - i.e. a*b+a*c should be a sum with two summands, as opposed to a*b+a*c+a*d having three summands. You can use operands() and operator() to do these things: sage: var('a,b,c,d') (a, b, c, d) sage: f=a*b+a*c+a*d sage: f.operands() [a*b, a*c, a*d] sage: f.operator() built-in function add sage: g=a*(b+c) sage: g.operands() [b + c, a] sage: g.operator() built-in function mul 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 -- 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] Ppc64 debian
Hello everyone, I have a multiprocessor ppc64 system that I would like to use as a sage server. I understand that there is no ready-to-run port for this and I would be willing to try and construct one. At the moment I run into some errors when compiling numpy. Does anyone have any experience with this? I'll start posting logs to my website tomorrow ( with a complete how-to as a final goal in mind ). Thanks in advance, Leon -- Met vriendelijke groeten,/With regards, Léon Swinkels -- 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 evaluate an expression numerically
Hi List, I'm a sage newbie and am having trouble getting a numerical expression from sage. # I've set up an equation: phi(t) = A*exp(k*c*t) # and I solve it for when the exponential grows past 1: time = solve(phi == 1,t) time [t == 432000*log(1000)/pi] Now, how can I evaluate 'time' or 't=...'? I'd like to remove the log and pi and just get a number that I can do some math with. Thanks, -k. -- 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 evaluate an expression numerically
mankoff wrote: Hi List, I'm a sage newbie and am having trouble getting a numerical expression from sage. # I've set up an equation: phi(t) = A*exp(k*c*t) # and I solve it for when the exponential grows past 1: time = solve(phi == 1,t) time [t == 432000*log(1000)/pi] Now, how can I evaluate 'time' or 't=...'? I'd like to remove the log and pi and just get a number that I can do some math with. Nevermind, I figured it out: time[0].right().n() Not sure why time.rhs() doesn't work... -k. -- 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: How to evaluate an expression numerically
time[0].right().n() Not sure why time.rhs() doesn't work... That I can explain. time is a list (well, technically a Sequence) of equations, and so you'd need to type time[0].rhs(). The individual equations have right hand sides, but the list itself doesn't. FWIW, I prefer using dicts rather than equations as the return type: sage: var(A k c) (A, k, c) sage: phi(t) = A*exp(k*c*t) sage: s = solve(phi==1,t,solution_dict=True) sage: s [{t: log(1/A)/(c*k)}] sage: s[0][t] log(1/A)/(c*k) which handles the cases with more than one variable a little easier, I think, but YMMV. Doug -- 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] Chinese Remainder Theorem
I want to find x using Chinese Remainder Theorem such that x=a_1 mod b_1 x=a_2 mod b_2 x=a_3 mod b_3 x=a_4 mod b_4 -- 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] Chinese Remainder Theorem
On May 15, 2011, at 22:30 , Santanu Sarkar wrote: I want to find x using Chinese Remainder Theorem such that x=a_1 mod b_1 x=a_2 mod b_2 x=a_3 mod b_3 x=a_4 mod b_4 Try sage: CRT? HTH Justin -- Justin C. Walker, Curmudgeon-at-Large () The ASCII Ribbon Campaign /\ Help Cure HTML Email -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org