2015-01-13 21:13:22 +0100 | received badge | ● Famous Question (source) |

2014-10-07 08:17:20 +0100 | received badge | ● Notable Question (source) |

2014-07-25 10:51:07 +0100 | received badge | ● Popular Question (source) |

2014-06-27 21:36:35 +0100 | commented answer | Fastest way to call special function (elliptic integral) from cython code for gsl ode_solver() I'm using cloud.sagemath.com - Is there any simple way of figure out what's available and how to get to it? I found that hitting tab auto completes, and after a lot of guesswork and navigating auto complete trees I did finally find the elliptic functions here: **sage.libs.mpmath.ext_main.global_context.ellipk** It has sped things up by about a factor of 5. Wouldn't it be faster if I cimport sage.mpmath or something (like I have to do with sage.gsl.ode)? I tried that and sage complains about their not being a pyx file or something. Do I have to write my own, and would it help at all? |

2014-06-27 12:55:47 +0100 | asked a question | Fastest way to call special function (elliptic integral) from cython code for gsl ode_solver() I am using The code is working using an approximate This is causing the code to slow down by a factor of about 10^3. I know those special functions are going to be expensive, but timing the elliptic_ec() function in a separate cell returns 0 for the time, so these functions aren't I'm wondering if the problem is mostly just that I'm calling a python function from cython and losing the speed up because of that? Is there a better way to do that? There are c libraries available with those functions - would it be better to import the files into my project, and call them from the cython code? (not sure how to do that...) Sage seems to have some gsl packages already - does it also have those special functions through gsl? Is there a different package with a faster form of those functions? Disclaimer: I've played around with sage a bit in the past, but this is the first intensive numerical simulation I've attempted with it, so sage/python/cython are all relatively new to me. I'm more accustomed to Mathematica, Matlab/Octave and c++ Here are (I believe) the relevant bits of code: |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.