ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 26 Feb 2022 15:44:14 +0100Contour Plot of 1/(2*pi*sqrt(x^2 + y^2)), why is it square? How to fix it?https://ask.sagemath.org/question/61288/contour-plot-of-12pisqrtx2-y2-why-is-it-square-how-to-fix-it/I plotted the contour plot of a function `1/(2*pi*sqrt(x^2 + y^2))`.
The code is below:
contour_plot(1/2/(pi*sqrt(x^2 + y^2)), (x, -0.1, 0.1), (y, -0.1, 0.1),
plot_points=20, colorbar=True)
**The output result is not round, but square! Why?**
**How to fix it?**Tube777tubeSat, 26 Feb 2022 15:44:14 +0100https://ask.sagemath.org/question/61288/how to find a local maximum?https://ask.sagemath.org/question/8890/how-to-find-a-local-maximum/Hello. I'm fairly new to Sage, so lets see if someone more experienced can help!
Say I have a function f(x) continuous in [a,b] and derivable in (a,b).
How can I implement in Sage a function 'maximum(f,a,b)' that returns the maximum of f(x) in [a,b] (as a numerical approximation, not as an expression)?
Thanks you a lot!NilSun, 15 Apr 2012 15:37:12 +0200https://ask.sagemath.org/question/8890/What are my best options for taking advantage of multiple cores?https://ask.sagemath.org/question/7578/what-are-my-best-options-for-taking-advantage-of-multiple-cores/What are my best options for taking advantage of multiple cores?
For the pure python case?
For working with sets of particular libraries which sage interfaces?
Note: Apple just started offering 12-core mac-pros (24 virtual cpus with hyper-threading). Since the transistors are getting about as small as they can, parallel computing is impacting the entire technology stack. Please note I'm not asking how to categorize algorithms, I'm aware that some naturally parallelize better than others. This is a recipes/examples question.
Does Sage already comprehensively address this, and if not, does the Sage roadmap address it?ccanoncThu, 19 Aug 2010 01:06:30 +0200https://ask.sagemath.org/question/7578/How to install patches? (Or should we?)https://ask.sagemath.org/question/8835/how-to-install-patches-or-should-we/Hi -
Hopefully this question is basic, but I haven't been able to find a clear answer online. (For the record, I am using the Sage notebook with the app version of Sage on a Mac.)
I consider myself a lowly and ignorant end user of Sage -- maybe one day I'll know enough to be able to contribute to development, but that day is not near. How do I (or should I, even) download and install patches, fixes and updates to Sage, short of doing a whole new installation from scratch?
More specifically: Suppose I encounter some bug or shortcoming with Sage, and I discover that there is already a ticket for that problem on the [Sage developer trac](http://trac.sagemath.org/sage_trac/). Suppose that that ticket is categorized as "fixed," and I see a link to some file (usually ending with .spkg, .patch, or .diff) near the top of the page. Is that file something that I, the lowly end user, am meant to download and install, hopefully fixing my problem? Or are those files on sage_trac really just meant for development work, and the fix will only trickle down to the end users once those fixes are incorporated into a future version of Sage?
If am I meant to be installing these patches myself, how exactly is that done? That is, where do I put the files, and what do I type where?
I feel like an idiot phrasing it in such basic terms. And I'm sure that the answers to my questions are already floating out there somewhere, but I haven't been able to find them. For example, the help stuff I've found out there for sage_trac is all about how to post or contribute to a trac ticket, rather than how to take advantage of the fixes found for that ticket.jdcThu, 29 Mar 2012 12:27:33 +0200https://ask.sagemath.org/question/8835/Problem with supercriptshttps://ask.sagemath.org/question/7872/problem-with-supercripts/I've read that variables can be subscripted with underscore "_" and superscripted with caret "^". However supescripting doesn't seem to work. I think the caret is seen as a power operator. How to work around this?
Subscript example that works:
var('x,y,z_a')
eqn = x == y*z_a
solve(eqn, z_a)
Superscript example that fails:
var('x,y,z^a')
eqn = x == y*z^a
solve(eqn, z^a)
mouseWed, 19 Jan 2011 19:01:36 +0100https://ask.sagemath.org/question/7872/Find .f2py_f2cmap file from notebookhttps://ask.sagemath.org/question/7765/find-f2py_f2cmap-file-from-notebook/Is it possible to get f2py (%fortran) to find an .f2py_f2cmap file when using the notebook?
QuestorsSun, 14 Nov 2010 15:27:58 +0100https://ask.sagemath.org/question/7765/HowTo implement filter for multiprocessing module?https://ask.sagemath.org/question/7621/howto-implement-filter-for-multiprocessing-module/from multiprocessing import Pool<br>
p = Pool(2)<br>
<br>
I notice that p.map() is implemented, but not p.filter(). What's a good idiom for filter() over multiple processes/cores?ccanoncMon, 23 Aug 2010 16:23:13 +0200https://ask.sagemath.org/question/7621/Implementing different groebner_basis() algorithmshttps://ask.sagemath.org/question/7619/implementing-different-groebner_basis-algorithms/I'm not sure if this is the correct forum to ask this type of question, but I'll try anyway.
I am curious if there is a way to do the following in Sage. I would like a way to make a Groebner basis calculation to not worry about calculations involving polynomials of too high degree. Macaulay2's gb command has the ability to specify this with an option called HardDegreeLimit, for instance. The Sage documentation on groebner_basis seems to imply that I can use Macaulay2's gb command with this option, but I don't know how to make it work. Singular's std command also has a degBound option, but I again don't know how to use this in my Sage implementation.Chris AholtMon, 23 Aug 2010 15:28:46 +0200https://ask.sagemath.org/question/7619/Is notebook() mutually-exclusive from "./sage -gdb" mode?https://ask.sagemath.org/question/7606/is-notebook-mutually-exclusive-from-sage-gdb-mode/I tried running with the debugger attached, but my notebook became unresponsive. Tips?ccanoncSat, 21 Aug 2010 08:01:34 +0200https://ask.sagemath.org/question/7606/Short Cython Example In A Notebook Cell?https://ask.sagemath.org/question/7559/short-cython-example-in-a-notebook-cell/What's the best way to integrate (new) cython code into your notebook?ccanoncWed, 18 Aug 2010 23:11:58 +0200https://ask.sagemath.org/question/7559/