Ask Your Question

niles's profile - activity

2017-03-24 04:26:21 -0500 received badge  Great Answer (source)
2017-02-22 20:18:13 -0500 received badge  Famous Question (source)
2017-02-21 22:58:54 -0500 received badge  Good Answer (source)
2017-02-08 16:32:44 -0500 received badge  Great Answer (source)
2016-12-03 22:32:11 -0500 received badge  Good Answer (source)
2016-11-05 05:37:53 -0500 received badge  Necromancer (source)
2016-11-05 05:37:26 -0500 received badge  Nice Answer (source)
2016-11-05 05:36:57 -0500 received badge  Nice Answer (source)
2016-11-02 21:37:36 -0500 received badge  Necromancer (source)
2016-11-02 20:57:24 -0500 received badge  Nice Answer (source)
2016-11-02 16:23:26 -0500 received badge  Necromancer (source)
2016-11-02 15:52:03 -0500 received badge  Good Answer (source)
2016-11-02 15:52:03 -0500 received badge  Nice Answer (source)
2016-10-17 13:31:27 -0500 marked best answer Will upgrading to Python 3.x on my system break Sage?

I want to use Python 3.2 for some other things, but I know that Sage does not work with Python 3.x. But I also know that Sage comes with its own version of Python. So can I upgrade my system's Python and let Sage use it's own Python 2.x? Will this happen automatically?

A side note: The barriers to using Python 3.x in Sage, as listed on the FAQ page, are SciPy and Cython, however recent versions of both now seem to support 3.x:

2016-10-03 15:46:17 -0500 received badge  Famous Question (source)
2016-09-30 15:44:12 -0500 answered a question Is it possible to embed a plot (or png) within another plot?

I'm not aware of a Sage command for this, but I have three ideas for how to do it:

  • Use matplotlib: Sage does a lot of its plotting under the hood with matplot lib. If all of the things you're drawing are produced using matplot lib internally, then you could try to get the underlying matplotlib objects and combine them using its (extensive) functionality. [You could check the source code to see whether there are some internal methods to get the matplot lib objects.]

  • Use PIL: Sage includes the Python Image Library, so you could try to use it to overlay the different images.

  • Use ImageMagick (convert): This isn't included with Sage, but is standard on many *nix systems. Save the individual images, and then make a montage.

2016-09-26 14:36:11 -0500 answered a question RuntimeError: Use ** for exponentiation, not '^', which means xor in Python, and has the wrong precedence.

As the error message says, python uses the double star for exponentiation, as in 2**3 = 8. Sage mostly hides this from the user, but you seem to have something executing in python that is not pre-parsed by Sage.

When I try to copy/paste your code, I get errors that N, u1, u2, c1, c2 are not defined. What values are you using for those? When I tried giving those some integer values, your code ran without error.

sage: N = 11
sage: u1 = 3
sage: u2 = 7
sage: c1 = 1
sage: c2 = -1
sage: x = PolynomialRing(ZZ.quo(N*ZZ), 'x').gen()
sage: e = 3
sage: f = (u1*x + u1*u1)^e - c1
sage: g = (u2*x + u2*u2)^e - c2
sage: f*g
10*x^6 + 3*x^5 + 9*x^3 + 3*x^2 + 9*x + 10
2016-09-21 10:05:04 -0500 received badge  Necromancer (source)
2016-09-19 15:32:29 -0500 received badge  Great Answer (source)
2016-09-19 15:32:29 -0500 received badge  Guru (source)
2016-09-19 10:53:16 -0500 answered a question Add a 3d graphics object to a tachyon scene

This has been requested from time to time in the past. Functionality to do this automatically is definitely something we'd like to add to sage. There is an open ticket, and there you can see a few different approaches that people have given in the past. Hopefully one of them will help you with your task!

Unfortunately, there isn't any active work on choosing a method and including it into sage. Any effort would be welcome :)

2016-08-06 03:04:42 -0500 received badge  Famous Question (source)
2016-07-27 14:41:23 -0500 received badge  Good Answer (source)
2016-07-20 20:53:15 -0500 received badge  Notable Question (source)
2016-06-03 00:11:26 -0500 received badge  Notable Question (source)
2016-03-20 17:36:17 -0500 received badge  Notable Question (source)
2016-03-07 06:47:47 -0500 received badge  Good Answer (source)
2016-02-23 05:15:27 -0500 received badge  Great Answer (source)
2016-01-25 13:23:58 -0500 received badge  Notable Question (source)
2016-01-04 05:33:37 -0500 received badge  Notable Question (source)
2015-12-01 05:24:57 -0500 received badge  Nice Answer (source)
2015-11-16 14:19:46 -0500 commented question Boundaries for parametric_plot3d?

The camera position is set internally (I forget where at the moment -- it's not obvious at first glance). I've looked into this before, and recall finding no convenient way to override the automatic defaults. So a zero-opacity bounding object(s) is probably the most elegant solution :/

2015-10-28 21:55:14 -0500 received badge  Good Question (source)
2015-10-28 21:55:13 -0500 marked best answer Penrose tilings with Sage

I would like to make a poster from a Penrose tiling. Google didn't give me any Sage code for doing this, but I wonder if someone here knows of such a thing!

2015-10-28 21:54:28 -0500 received badge  Popular Question (source)
2015-09-30 16:56:03 -0500 received badge  Nice Answer (source)
2015-09-23 15:21:15 -0500 answered a question MainMenu.nib permissions for installer only


755 /Applications/*nib

2015-09-23 14:29:35 -0500 answered a question MainMenu.nib permissions for installer only


2015-09-23 14:05:10 -0500 commented question MainMenu.nib permissions for installer only

test comment

2015-09-23 14:03:52 -0500 edited question MainMenu.nib permissions for installer only
Sage: Unable to read contents in the Interface Builder file at path /Applications/ due to error: The file “MainMenu.nib” couldn’t be opened because you don’t have permission to view it..

bash-3.2# ls -ld /Applications/
drwxr-xr-x@ 6 installer  admin  204 Sep 22 13:22 /Applications/

bash-3.2# ls -l /Applications/
total 16
-rw-r--r--@ 1 installer  admin  410 Jul 28 16:45 Credits.html
-rw-r--r--@ 1 installer  admin   92 Jul 28 16:45 InfoPlist.strings
drwx------@ 4 installer  admin  136 Feb 14  2014 MainMenu.nib
drwx------@ 4 installer  admin  136 Feb 14  2014 MyDocument.nib

Also had the same problem with 6.5 10.10 app.

2015-08-24 07:06:33 -0500 edited question How to define the derivative of a function


I want to tell Sage what expression to use for the derivative of a funtion a. This vould be something like this: diff(a,t) = b^2. But this doesn't do the trick...

Example I want to define this set of differential quations:

  • aDot = da/dt = b^2,
  • bdot = db/da = u.

I want Sage to find the relation between a and u. For that Sage needs to differentiate a twice: - diff(a,t,2) But to be able to calculate d^2/d t ^2 a = d/dt *b^2 = 2 bu, Sage needs to to both differential equations.

How can I implemant that?

Thanks alot in advance for your replies!


2015-08-24 07:05:44 -0500 commented question How to define the derivative of a function

It sounds like the following might work for you:

2015-08-04 07:22:37 -0500 marked best answer should I _really_ review trac tickets?

As a new developer to sage, it's not clear when a person should start reviewing patches. Perhaps that's intentional, since perhaps different people are ready at different times, but some guidelines would be helpful. For example, "wait until you have at least a couple of positively reviewed patches", or "despite the great need for patch reviews, developers active for less than one year are not expected to review patches". Do either of these really make sense?

The sage developer guide simply says:

If someone (other than you) has posted a patch for a ticket on the trac server, you can review it.

And then proceeds to give instructions.

About the instructions: There are two lists of instructions for patch reviewers, with slightly different advice; the short one links to the long one, but not vice versa, and I don't think the content of the short one is exactly contained in the long one.

short: Walking Through the Development Process: reviewing a patch

long: The Sage Trac Server: reviewing patches

Here are some further issues not addressed by either set of instructions:

  • conforming to sage/python coding conventions: how thorough must the reviewer's knowledge be? (am I really expected to know and enforce _all_ of the python coding conventions, for example)
  • author/contributor names should be added to source (I thought I saw this somewhere else in the developer guide)
  • ticket number should be mentioned in comments (I learned this from a reviewer of one of my patches)
  • make ptestlong must pass all tests for the patch to be included; make ptest is not sufficient in general. (learned this the hard way)
  • the #random tag is no longer (never was?) necessary, even though you see it in some sage documentation; the random seed is always the same when doctesting, so you really have to implement a random test suite if you want randomized tests.
2015-08-04 07:20:56 -0500 received badge  Famous Question (source)