[sage-support] Cython problem when updating.

2011-02-08 Thread Ethan Van Andel
I recently tried to update sage from version 4.6 or 4.5.something, I forget which. When sage was rebuilding, however, I encountered the compile failure described here: http://trac.sagemath.org/sage_trac/ticket/9828#comment:2 This looks like an issue that was fixed in the past, what do I need to d

[sage-support] Re: creating a clean library

2009-07-28 Thread Ethan Van Andel
how do I make the new copy the active one? That is, how do I make "sage" in the command line refer to the new one? Thanks --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-su

[sage-support] creating a clean library

2009-07-27 Thread Ethan Van Andel
I've been messing with my sage source. I've finally created the stuff I want, but in the process have fiddled with other things. What's the best way to create a clean, current library so that I can put just the correct stuff in and make a patch? Thanks, Ethan --~--~-~--~~

[sage-support] Re: doctests and the long flag

2009-07-24 Thread Ethan Van Andel
Excellent, thanks --~--~-~--~~~---~--~~ 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] Re: doctests and the long flag

2009-07-24 Thread Ethan Van Andel
Thanks, I know that when I run the doctests it can work that way, but should I be concerned about it failing later? Are all sage packages doctested before a release? Will my stuff fail then? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@go

[sage-support] doctests and the long flag

2009-07-24 Thread Ethan Van Andel
My code has doctests that look like this: EXAMPLES: :: sage: m = Riemann_Map([e^(I*t)],[I*e^(I*t)],0) #long time (4 sec) sage: points = m.get_theta_points() sage: list_plot(points) sage: s = spline(pts) sage: s(3*pi/4)

[sage-support] Re: changeing sage -b (cython)

2009-07-22 Thread Ethan Van Andel
Yet another question: When I compile my class, I get something like this: cdef class Riemann_Map: cdef int N, B, ncorners cdef f cdef opp cdef double complex a cdef np.ndarray[float,ndim = 1] tester ^ -

[sage-support] Re: changeing sage -b (cython)

2009-07-22 Thread Ethan Van Andel
Robert, Is there any prediction for when numpy complex types will work? (outside of the notebook, when compiling via sage -b) Thanks, Ethan --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, se

[sage-support] Re: changeing sage -b (cython)

2009-07-22 Thread Ethan Van Andel
Robert, Should those double complex declarations give any speedup? Are they declaring the numpy complex type or something else? Slightly unrelated, how are self.something variables handled? It seems like you can't cdef them, so are they then always going to be slow? If you cdef a variable and t

[sage-support] Re: changeing sage -b (cython)

2009-07-21 Thread Ethan Van Andel
I think it only works outside, when compiling extensions for sage. However, I am also getting issues with complex types after the fix, did you get them to compile regularly outside? Ethan --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googl

[sage-support] pointsize vs thickness

2009-07-21 Thread Ethan Van Andel
Apologies if this has already been addressed. In list_plot, if I'm plotting points with "plotjoined = true", I need to use the "thickness = x" argument, but if I use "plotjoined = false" then I need to use "pointsize = x". Each argument is ignored and gives a message in the wrong context. This is

[sage-support] Re: changeing sage -b (cython)

2009-07-21 Thread Ethan Van Andel
Thank you, that worked beautifully. Ethan --~--~-~--~~~---~--~~ 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:/

[sage-support] changeing sage -b (cython)

2009-07-17 Thread Ethan Van Andel
Is it possible to change the version of Cython that sage -b runs? (it uses 11.1, I need the complex support added in 11.2) Alternately, is it possible to compile the stuff that needs that version separately and then just stick it where it belongs? Thanks, Ethan --~--~-~--~~-

[sage-support] lambda/ function calls in cython fro complex_plot

2009-07-16 Thread Ethan Van Andel
Sorry to keep spamming sage-support. I have a class instance m with a method riemann_map so that m.riemann_map(z) returns a (numpy) complex value. I want to do a complex_plot of that function. If I try: complex_plot(m.riemann_map,(-2,2),(-2,2)) I get this error: ... File "fast_eval.pyx", line 1

[sage-support] integer division in sage/cython

2009-07-16 Thread Ethan Van Andel
What is the "official" way to correctly divide 2 integer variables in a %cython cell in a sage notebook? I know that in general you'd do "from __future__ import division" but it looks like the notebook doesn't like __future__ imports. I have an simple workaround, so this isn't urgent, I'd just li

[sage-support] Re: Cython Modules

2009-07-16 Thread Ethan Van Andel
What do I import it as? if I try "import module my_stuff" (the folder that I saved it in, and added to the package list) it tells me there's no module of that name. If I try "import my_stuff.interpolators" (The extension name and the name of the .pyx file) it tells me the same thing. Thanks, Eth

[sage-support] Re: Cython Modules

2009-07-16 Thread Ethan Van Andel
Thank you, that did the trick. However, while everything compiles now, I cant use my stuff in the notebook. I've run sage -b and I'm pretty sure my module_list.py and setup.py entries are correct. Do I have to import or include anything? Do my entries have to be in the proper alphabetical order?

[sage-support] Cython Modules

2009-07-15 Thread Ethan Van Andel
I want to include some of my cython code as a sage module. I followed the directions for adding the .pyx file to the sage library at http://www.sagemath.org/doc/developer/coding_in_other.html. However, when I run "sage -b" I get this: -- sag

[sage-support] Cython typedef not working

2009-07-14 Thread Ethan Van Andel
When I run this code: %cython %time import numpy as np cimport numpy as np COMPLEX = np.complex128 ctypedef np.complex128_t COMPLEX_t it gives me this error: "...code_sage30_spyx_0.pyx:10:9: 'complex128_t' is not a type identifier" As far as I can tell my code should work. At one point I thin

[sage-support] Re: 0.0 to a negative or complex power

2009-07-08 Thread Ethan Van Andel
Ok, after messing around I discovered that I can solve my problem by changing angle = abs((PI/corners[i][1])) to angle = np.complex(abs ((PI/corners[i][1])),0) However, it seems like the first should work. Is this a known issue? --~--~-~--~~~---~--~~ To post to th

[sage-support] 0.0 to a negative or complex power

2009-07-08 Thread Ethan Van Andel
In my program I have a section like this: angle = abs((PI/corners[i][1])) print angle, (z-corners[i][0]) tempz = (z-corners[i][0])**angle The output reads like this: 2.00 0j ... tempz = (z-corners[i][0])**angle File "real_mpfr.pyx", line 2935, in sage.rings.real_mpfr.RealNumber.

[sage-support] Re: Running long processes on the server

2009-07-07 Thread Ethan Van Andel
On Jul 7, 3:52 pm, William Stein wrote: > On Tue, Jul 7, 2009 at 12:29 PM, Ethan Van Andel wrote: > > > I am running some image generation stuff over the sagenb server. They > > can take a LONG time (2.5 hours or more). I find that often when I > > check on the process

[sage-support] Running long processes on the server

2009-07-07 Thread Ethan Van Andel
I am running some image generation stuff over the sagenb server. They can take a LONG time (2.5 hours or more). I find that often when I check on the process, it has been interupted with an error message like this: /home/sage/sage_install/sage/local/bin/sage-sage: line 349: 3500 Killed python "$

[sage-support] show "buffer"

2009-07-06 Thread Ethan Van Andel
When I show() a graphics object such as plot(x,-1,1), it plots it in the desired range, but also adds a sort "buffer" around the image, the axes extend beyond the region I told it to show, in the case of plot (x) instead of [-1,1],[-1,1] its more like [-1.5,1.5]. This persists if I specify the sho

[sage-support] Automatically saving plots

2009-07-02 Thread Ethan Van Andel
Is there something I can do in sage so that when I show a plot (create a png) it will automatically save it to a folder on my computer? I can do it manually, but automatically would be nice. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@go

[sage-support] unable to use prun

2009-06-26 Thread Ethan Van Andel
I'm trying to profile my code using "prun" like the tutorial says. However, I can't get it to work. For example a command like this: %prun plot(x,0,2) gives this error: Syntax Error: %prun plot(x,0,2) and this: prun plot(x,0,2) gives this error: line 4 prun plot(x,_sage_const_0 ,_sage_con

[sage-support] Re: Optimization Resources

2009-06-25 Thread Ethan Van Andel
Thanks for the help so far. I've come a fair way and implemented a good portion in cython. However, the speedup was only minor (< a factor of 2) and I suspect I'm missing something. If anyone can give me any tips on how to optimize the code, that would be most appreciated. Tips on the code itself

[sage-support] cmath module out of date?

2009-06-22 Thread Ethan Van Andel
I'm writing code for a cython module, but right now I'm doing it in the sage worksheet for convenience. This means that I don't have access to sage's arg(complex number) function. Therefore, I decided to use the cmath module's "phase(x)" function which does the same thing. When I import cmath, how

[sage-support] Re: Numerical methods for solving matrix equations

2009-06-18 Thread Ethan Van Andel
That worked beautifully, thanks for the fast response. --~--~-~--~~~---~--~~ 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 grou

[sage-support] Numerical methods for solving matrix equations

2009-06-18 Thread Ethan Van Andel
Does sage have a way to use a numeric method (such as Jacobi, or Gauss- Sidel) to solve matrix equations of the form A*x = b? (CDF matrices by the way). the A.solve_right(b) method is too slow. Thanks, Ethan --~--~-~--~~~---~--~~ To post to this group, send email t

[sage-support] Re: Interior points of a parametric graph

2009-06-16 Thread Ethan Van Andel
Apologies, I changed my google search terms and immediately found an effective algorithm. All is well. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@g

[sage-support] Re: Interior points of a parametric graph

2009-06-16 Thread Ethan Van Andel
I think I've found the source code for that. However, It seems that it is a bit too deep/complex for me to use it as an effective base. Therefore, does anyone know a good way to find points on the interior of a figure? --~--~-~--~~~---~--~~ To post to this group, se

[sage-support] inline function declaration in Cython

2009-06-16 Thread Ethan Van Andel
I'm transferring some code to Cython to speed things up. In my SAGE/python code, I have a function which takes as one of its arguments, a function G. I then declare a series of intermediate functions like this: Gprime = derivative(G) Hconj(t) = 1/(2*pi*i)*(Gprime(t)/abs(Gprime(t))/(a-G(t)

[sage-support] Interior points of a parametric graph

2009-06-12 Thread Ethan Van Andel
I want to evaluate a function on points in the interior of a parametric function. Essentially what I'm trying to do is call complex_plot on the interior of a figure. To do this, I need some way to check whether a given point is in the figure, or simply generate a good list of points that are in. W