Skip to content

Commit

Permalink
doc: fix a few rst errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nolta committed May 26, 2014
1 parent 5fcfb13 commit adcde14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ Generic Functions
The elements generated by all the arguments are appended into a single
list, which is then passed to ``f`` as its argument list.

**Example**:
**Example**::

# Define a function f
julia> function f(x, y)
x + y
Expand All @@ -387,6 +387,7 @@ Generic Functions
Determine whether the given generic function has a method matching the given tuple of argument types.

**Example**::

julia> method_exists(length, (Array,))
true

Expand Down Expand Up @@ -498,6 +499,7 @@ The ``state`` object may be anything, and should be chosen appropriately for eac
Return an iterator that yields ``(i, x)`` where ``i`` is an index starting at 1, and ``x`` is the ``ith`` value from the given iterator. It's useful when you need not only the values `x` over which you are iterating, but also the index `i` of the iterations.

**Example**::

julia> a = ["a", "b", "c"]
julia> for (index, value) in enumerate(a)
println("$index $value")
Expand Down
3 changes: 2 additions & 1 deletion doc/stdlib/linalg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,9 @@ Linear algebra functions in Julia are largely implemented by calling functions f
.. function:: linreg(x, y) -> [a; b]

Linear Regression. Returns ``a`` and ``b`` such that ``a+b*x`` is the closest line to the given points ``(x,y)``. In other words, this function determines parameters ``[a, b]`` that minimize the squared error between ``y`` and ``a+b*x``.

**Example**::

using PyPlot;
x = float([1:12])
y = [5.5; 6.3; 7.6; 8.8; 10.9; 11.79; 13.48; 15.02; 17.77; 20.81; 22.0; 22.99]
Expand Down

0 comments on commit adcde14

Please sign in to comment.