[SciPy-User] info scipy.ndimage.filters.maximum_filter
Emmanuelle Gouillart
emmanuelle.gouillart@normalesup....
Wed Jun 23 04:17:41 CDT 2010
Hello,
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...
Cheers,
Emmanuelle
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 <dp82@nyu.edu> 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@scipy.org
> >> http://mail.scipy.org/mailman/listinfo/scipy-user
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User@scipy.org
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list