[SciPy-user] examples in docs

josef.pktd@gmai... josef.pktd@gmai...
Tue May 5 13:17:15 CDT 2009


On Tue, May 5, 2009 at 12:27 PM, Pauli Virtanen <pav@iki.fi> wrote:
> Tue, 05 May 2009 11:46:01 -0400, josef.pktd wrote:
>
>> Rob Falck just pointed out a nice set of examples for fmin_slsqp at
>> http://projects.scipy.org/scipy/attachment/ticket/570/slsqp_test.py.
>>
>> What's the best way to include them in the docs? the tutorial?
>
> The tutorial, I'd say.
>
>> Is there a way to include or link to examples that are too long for a
>> docstring?
>
> Add a label like
>
> .. _tutorial-sqlsp:
>
> at the relevant point in the tutorial, and refer it to as
>
>        More examples :ref:`in the tutorial <tutorial-sqlsp>`
>
> or :ref:`tutorial-sqlsp` in the docstring, or something along these lines.
>

I did this, but mostly cut and paste:

http://docs.scipy.org/scipy/docs/scipy.optimize.slsqp.fmin_slsqp/#scipy-optimize-fmin-slsqp
http://docs.scipy.org/scipy/docs/scipy-docs/tutorial/optimize.rst/#tutorial-sqlsp

Maybe someone who knows more about fmin_slsqp can edit it.

One more question:
http://docs.scipy.org/scipy/docs/scipy-docs/tutorial/optimize.rst
does a literal include of some files in the examples subdirectory. I
didn't find a way to display and edit them in the docs editor.
If we include more sample scripts, it might be good, to find a way to
add and edit them through the doc editor. Right now the relatively
long example script that I pasted looks a bit ugly in the tutorial
text.

Josef


More information about the SciPy-user mailing list