Popular recipes by David Lambert http://code.activestate.com/recipes/users/4167420/2010-02-26T11:34:01-08:00ActiveState Code RecipesPoor man's mgrid (Python) 2009-01-21T15:37:13-08:00David Lamberthttp://code.activestate.com/recipes/users/4167420/http://code.activestate.com/recipes/576625-poor-mans-mgrid/ <p style="color: grey"> Python recipe 576625 by <a href="/recipes/users/4167420/">David Lambert</a> (<a href="/recipes/tags/index/">index</a>, <a href="/recipes/tags/index_tricks/">index_tricks</a>, <a href="/recipes/tags/method/">method</a>, <a href="/recipes/tags/mgrid/">mgrid</a>, <a href="/recipes/tags/numerical/">numerical</a>, <a href="/recipes/tags/numerical_methods/">numerical_methods</a>, <a href="/recipes/tags/numpy/">numpy</a>, <a href="/recipes/tags/scipy/">scipy</a>, <a href="/recipes/tags/trick/">trick</a>). </p> <p>Python 3 code. scipy.mgrid is a useful! This short implementation comes without installing numpy.</p> Round to base (Python) 2009-01-28T09:48:13-08:00David Lamberthttp://code.activestate.com/recipes/users/4167420/http://code.activestate.com/recipes/576637-round-to-base/ <p style="color: grey"> Python recipe 576637 by <a href="/recipes/users/4167420/">David Lambert</a> . </p> <p>This python3 code generalizes rounding. It includes a "base" argument, which can be a float greater than 0. The "number of places" argument may also be a float. When the base is 10 Round uses builtins.round.</p> gsl with python3 (Python) 2010-02-26T11:34:01-08:00David Lamberthttp://code.activestate.com/recipes/users/4167420/http://code.activestate.com/recipes/576549-gsl-with-python3/ <p style="color: grey"> Python recipe 576549 by <a href="/recipes/users/4167420/">David Lambert</a> (<a href="/recipes/tags/gnu/">gnu</a>, <a href="/recipes/tags/gsl/">gsl</a>, <a href="/recipes/tags/library/">library</a>, <a href="/recipes/tags/scientific/">scientific</a>). </p> <p>Some shared library functionality is accessible directly from python. This code shows how to access a useful portion of the gsl from python3.</p> gsl real fft in python3 (Python) 2008-11-01T10:27:39-07:00David Lamberthttp://code.activestate.com/recipes/users/4167420/http://code.activestate.com/recipes/576550-gsl-real-fft-in-python3/ <p style="color: grey"> Python recipe 576550 by <a href="/recipes/users/4167420/">David Lambert</a> (<a href="/recipes/tags/fft/">fft</a>, <a href="/recipes/tags/gnu/">gnu</a>, <a href="/recipes/tags/gsl/">gsl</a>, <a href="/recipes/tags/library/">library</a>, <a href="/recipes/tags/scientific/">scientific</a>). </p> <p>Real_FFT wraps the gsl_fft_real_transform in a python3 setting. This recipe serves as a complete example for "<a href="http://code.activestate.com/recipes/576549/">Recipe 576549</a>: gsl with python3".</p> Sensible Loop Status (Python) 2008-10-05T02:14:52-07:00David Lamberthttp://code.activestate.com/recipes/users/4167420/http://code.activestate.com/recipes/576528-sensible-loop-status/ <p style="color: grey"> Python recipe 576528 by <a href="/recipes/users/4167420/">David Lambert</a> (<a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/progress/">progress</a>, <a href="/recipes/tags/status/">status</a>). </p> <p>A LoopStatus object tests true according to geometric progression or time intervals. This enables rapid time estimates for long running codes, typically in a loop, without producing copious highly repetitive output.</p>