# HG changeset patch
# User Robert Bradshaw <robertwb@math.washington.edu>
# Date 1356831524 28800
# Node ID f2e855a4692a245b4c080164fd34518d57de7485
# Parent 305b8c4e284fd3a5eb94e88595059ae0a11e388c
Re-tag gcc tests as optional.
diff --git a/sage/misc/cython.py b/sage/misc/cython.py
a
|
b
|
|
616 | 616 | |
617 | 617 | We make the same Lambda function, but in a compiled form. :: |
618 | 618 | |
619 | | sage: g = cython_lambda('double x, double y', 'x*x + y*y + x + y + 17*x + 3.2') |
620 | | sage: g(2,3) |
| 619 | sage: g = cython_lambda('double x, double y', 'x*x + y*y + x + y + 17*x + 3.2') # optional -- gcc |
| 620 | sage: g(2,3) # optional -- gcc |
621 | 621 | 55.2 |
622 | | sage: g(0,0) |
| 622 | sage: g(0,0) # optional -- gcc |
623 | 623 | 3.2 |
624 | 624 | |
625 | 625 | The following should work but doesn't, see :trac:`12446`:: |
626 | 626 | |
627 | 627 | sage: a = 25 |
628 | | sage: f = cython_lambda('double x', 'sage.math.sin(x) + sage.a') |
629 | | sage: f(10) # known bug |
| 628 | sage: f = cython_lambda('double x', 'sage.math.sin(x) + sage.a') # optional -- gcc |
| 629 | sage: f(10) # known bug, optional -- gcc |
630 | 630 | 24.455978889110629 |
631 | 631 | sage: a = 50 |
632 | | sage: f(10) # known bug |
| 632 | sage: f(10) # known bug, optional -- gcc |
633 | 633 | 49.455978889110632 |
634 | 634 | """ |
635 | 635 | if isinstance(vars, str): |
… |
… |
|
692 | 692 | sage: s = "def hello():\n print 'hello'\n" |
693 | 693 | sage: f.write(s) |
694 | 694 | sage: f.close() |
695 | | sage: cython_create_local_so('hello.spyx') |
696 | | sage: sys.path.append('.') |
697 | | sage: import hello |
698 | | sage: hello.hello() |
| 695 | sage: cython_create_local_so('hello.spyx') # optional -- gcc |
| 696 | sage: sys.path.append('.') # optional -- gcc |
| 697 | sage: import hello # optional -- gcc |
| 698 | sage: hello.hello() # optional -- gcc |
699 | 699 | hello |
700 | 700 | sage: os.chdir(curdir) |
701 | 701 | |
diff --git a/sage/misc/session.pyx b/sage/misc/session.pyx
a
|
b
|
|
266 | 266 | |
267 | 267 | Something similar happens for cython-defined functions.:: |
268 | 268 | |
269 | | sage: g = cython_lambda('double x', 'x*x + 1.5') |
270 | | sage: save_session('tmp_f', verbose=True) |
| 269 | sage: g = cython_lambda('double x', 'x*x + 1.5') # optional -- gcc |
| 270 | sage: save_session('tmp_f', verbose=True) # optional -- gcc |
271 | 271 | Saving... |
272 | 272 | Not saving g: g is a function, method, class or type |
273 | 273 | ... |