[SciPy-User] info scipy.ndimage.filters.maximum_filter
Thu Jun 24 11:37:07 CDT 2010
Nifty trick with IPython to see the wrapper. Thanks for the tip.
I found the C code on the web -- on the "SciPy Dev Wiki" -- but I was unable to locate it on my computer. I use the Enthought distribution for the Mac.
On Jun 23, 2010, at 11:17 AM, Emmanuelle Gouillart wrote:
> most of scipy.ndimage routines are written in C and then wrapped in
> Python. This makes code introspection a bit more difficult. For
> scipy.ndimage.filters.maximum_filter, the core of the routine can be
> found in the source file scipy/ndimage/src/ni_filters.c (the path of
> scipy sources depends on your installation), inside the
> NI_MinOrMaxFilter1D function (I don't know if you're familiar with C).
> If you're using the Ipython shell, a useful trick is to type '%edit
> function_name" to open the source code in a text editor, for example
>>>> from scipy import ndimage
>>>> %edit ndimage.maximum_filter
> Editing... done. Executing edited code...
> will open the the Python file with the wrapper. Of course, this feature
> is more useful when functions are written only with Python.
> I don't know if this partly answers your question or not...
> On Wed, Jun 23, 2010 at 10:54:05AM +0200, David Pine wrote:
>> I did but I tried again and found something called "SciPy Dev Wiki" (http://projects.scipy.org/scipy/browser/trunk/scipy/ndimage/filters.py?rev=6405) which contains the original Python code. I can figure things out from that. It seems odd to me that the there seems to be no link to the source code for these routines on the SciPy documentation site.
>> -David Pine
>> On Jun 23, 2010, at 10:22 AM, Sebastian Haase wrote:
>>> did you try to google for it ?
>>> - Sebastian Haase
>>> On Fri, Jun 18, 2010 at 5:08 PM, David Pine <email@example.com> wrote:
>>>> How do I get more detailed information about scipy.ndimage.filters.maximum_filter than is available at the Numpy and Scipy Documentation Reference Guide? The guide tells you what the routine does but not how it does it.
>>>> SciPy-User mailing list
>>> SciPy-User mailing list
>> SciPy-User mailing list
> SciPy-User mailing list
More information about the SciPy-User