Skip to content

Commit 096c3a2

Browse files
committed
Make lines shorter (for mobile-friendliness)
1 parent 93e69c2 commit 096c3a2

File tree

9 files changed

+38
-35
lines changed

9 files changed

+38
-35
lines changed

advanced/advanced_numpy/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ Casting
331331

332332
.. note::
333333

334-
Exact rules: see documentation:
335-
http://docs.scipy.org/doc/numpy/reference/ufuncs.html#casting-rules
334+
Exact rules: see `numpy documentation
335+
<http://docs.scipy.org/doc/numpy/reference/ufuncs.html#casting-rules>`_
336336

337337

338338
Re-interpretation / viewing

advanced/image_processing/index.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ arrays.
3838
* ``numpy``: basic array manipulation
3939

4040
* ``scipy``: ``scipy.ndimage`` submodule dedicated to image processing
41-
(n-dimensional images). See http://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html ::
41+
(n-dimensional images). See the `documentation
42+
<http://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html>`_::
4243

4344
>>> from scipy import ndimage
4445

@@ -425,7 +426,8 @@ Other local non-linear filters: Wiener (``scipy.signal.wiener``), etc.
425426
Mathematical morphology
426427
-----------------------
427428

428-
See https://en.wikipedia.org/wiki/Mathematical_morphology
429+
See `wikipedia <https://en.wikipedia.org/wiki/Mathematical_morphology>`_
430+
for a definition of mathematical morphology.
429431

430432
Probe an image with a simple shape (a **structuring element**), and
431433
modify this image according to how the shape locally fits or misses the
@@ -851,8 +853,8 @@ Non-regularly-spaced blocks: radial mean::
851853

852854
Correlation function, Fourier/wavelet spectrum, etc.
853855

854-
One example with mathematical morphology: **granulometry**
855-
(https://en.wikipedia.org/wiki/Granulometry_%28morphology%29)
856+
One example with mathematical morphology: `granulometry
857+
<https://en.wikipedia.org/wiki/Granulometry_%28morphology%29>`_
856858

857859
::
858860

packages/scikit-image/index.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ Enhances contrast in large almost uniform regions.
333333
Mathematical morphology
334334
-----------------------
335335

336-
See https://en.wikipedia.org/wiki/Mathematical_morphology
336+
See `wikipedia <https://en.wikipedia.org/wiki/Mathematical_morphology>`_
337+
for an introduction on mathematical morphology.
337338

338339
Probe an image with a simple shape (a **structuring element**), and
339340
modify this image according to how the shape locally fits or misses the
@@ -723,9 +724,11 @@ Example: detecting corners using Harris detector ::
723724
:target: auto_examples/plot_features.html
724725
:align: center
725726

726-
(this example is taken from
727-
http://scikit-image.org/docs/stable/auto_examples/plot_corner.html)
727+
(this example is taken from the `plot_corner
728+
<http://scikit-image.org/docs/stable/auto_examples/plot_corner.html>`_
729+
example in scikit-image)
728730

729731
Points of interest such as corners can then be used to match objects in
730-
different images, as described in
731-
http://scikit-image.org/docs/stable/auto_examples/plot_matching.html
732+
different images, as described in the `plot_matching
733+
<http://scikit-image.org/docs/stable/auto_examples/plot_matching.html>`_
734+
example of scikit-image.

packages/traits/index.rst

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ The Traits project allows you to simply add validation, initialization, delegati
2424

2525
.. topic:: Requirements
2626

27-
* Python 2.6 or 2.7 (www.python.org)
28-
* Either wxPython (http://www.wxpython.org/),
29-
PyQt (https://riverbankcomputing.com/software/pyqt/intro) or
30-
PySide (https://pyside.github.io/docs/pyside/)
31-
* Numpy and Scipy (http://www.scipy.org)
32-
* Enthought Tool Suite 3.x or higher (http://code.enthought.com/projects)
33-
* All required software can be obtained by installing the EPD Free
34-
(https://store.enthought.com/)
27+
* Either `wxPython <http://www.wxpython.org>`_,
28+
`PyQt <https://riverbankcomputing.com/software/pyqt/intro>`_ or
29+
`PySide <https://pyside.github.io/docs/pyside/>`_
30+
* Numpy and Scipy
31+
* `Enthought Tool Suite <http://code.enthought.com/projects>`_
32+
* All required software can be obtained by installing the `EPD Free
33+
<https://store.enthought.com/>`_
3534

3635

3736
.. contents:: Tutorial content
@@ -216,10 +215,10 @@ Every trait does validation when the user tries to set its content:
216215
reservoir.max_storage = '230'
217216
---------------------------------------------------------------------------
218217
TraitError Traceback (most recent call last)
219-
/Users/dpinte/projects/scipy-lecture-notes/advanced/traits/<ipython-input-7-979bdff9974a> in <module>()
218+
.../scipy-lecture-notes/advanced/traits/<ipython-input-7-979bdff9974a> in <module>()
220219
----> 1 reservoir.max_storage = '230'
221220

222-
/Users/dpinte/projects/ets/traits/traits/trait_handlers.pyc in error(self, object, name, value)
221+
.../traits/trait_handlers.pyc in error(self, object, name, value)
223222
166 """
224223
167 raise TraitError( object, name, self.full_info( object, name, value ),
225224
--> 168 value )
@@ -429,8 +428,7 @@ TraitsUI Item, the ChacoPlotItem:
429428

430429
.. seealso:: References
431430

432-
* ETS repositories: https://github.com/enthought
433-
* Traits manual: http://docs.enthought.com/traits/traits_user_manual/index.html
434-
* Traits UI manual: http://docs.enthought.com/traitsui/traitsui_user_manual/index.html
435-
431+
* `ETS repositories <https://github.com/enthought>`_
432+
* `Traits manual <http://docs.enthought.com/traits/traits_user_manual/index.html>`_
433+
* `Traits UI manual <http://docs.enthought.com/traitsui/traitsui_user_manual/index.html>`_
436434
* Mailing list : enthought-dev@enthought.com

packages/traits/reservoir_evolution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ReservoirEvolution(HasTraits):
2121

2222
month = Property(depends_on='stock')
2323

24-
### Traits view ##########################################################
24+
### Traits view ###########
2525
traits_view = View(
2626
Item('name'),
2727
Group(
@@ -31,7 +31,7 @@ class ReservoirEvolution(HasTraits):
3131
resizable = True
3232
)
3333

34-
### Traits properties ####################################################
34+
### Traits properties #####
3535
def _get_stock(self):
3636
"""
3737
fixme: should handle cases where we go over the max storage

packages/traits/reservoir_state_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ class ReservoirState(HasTraits):
2424
desc='Spillage [hm3]', depends_on=['storage', 'inflows', 'release']
2525
)
2626

27-
### Private traits. ######################################################
27+
### Private traits.
2828
_storage = Float
2929

30-
### Traits property implementation. ######################################
30+
### Traits property implementation.
3131
def _get_storage(self):
3232
new_storage = self._storage - self.release + self.inflows
3333
return min(new_storage, self.max_storage)

packages/traits/reservoir_state_property_ontraitchange.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class ReservoirState(HasTraits):
2525
)
2626

2727

28-
### Private traits. ######################################################
28+
### Private traits. ##########
2929
_storage = Float
3030

31-
### Traits property implementation. ######################################
31+
### Traits property implementation.
3232
def _get_storage(self):
3333
new_storage = self._storage - self.release + self.inflows
3434
return min(new_storage, self.max_storage)

packages/traits/reservoir_state_property_view.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ReservoirState(HasTraits):
2525
desc='Spillage [hm3]', depends_on=['storage', 'inflows', 'release']
2626
)
2727

28-
### Traits view ##########################################################
28+
### Traits view
2929
traits_view = View(
3030
Group(
3131
VGroup(Item('name'), Item('storage'), Item('spillage'),
@@ -35,10 +35,10 @@ class ReservoirState(HasTraits):
3535
)
3636
)
3737

38-
### Private traits. ######################################################
38+
### Private traits.
3939
_storage = Float
4040

41-
### Traits property implementation. ######################################
41+
### Traits property implementation.
4242
def _get_storage(self):
4343
new_storage = self._storage - self.release + self.inflows
4444
return min(new_storage, self.max_storage)

packages/traits/reservoir_state_static_listener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def print_state(self):
2626
self.spillage)
2727
print '-' * 79
2828

29-
### Traits listeners #####################################################
29+
### Traits listeners ###########
3030
def _release_changed(self, new):
3131
"""When the release is higher than zero, warn all the inhabitants of
3232
the valley.

0 commit comments

Comments
 (0)