summaryrefslogtreecommitdiff
path: root/numpy/doc/example.py
blob: cb5c24690625f10a7d2f6b6ec9e4e6370bccda98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

__docformat__ = "restructuredtext en"


def foo(var1, var2, long_var_name='hi') :
    """One-line summary or signature.

    Several sentences providing an extended description. You can put
    text in mono-spaced type like so: ``var``.

    *Parameters*:

        var1 : {array_like}
            Array_like means all those objects -- lists, nested lists, etc. --
            that can be converted to an array.
        var2 : {integer}
            Write out the full type
        long_variable_name : {'hi', 'ho'}, optional
            Choices in brackets, default first when optional.

    *Returns*:

        named : {type}
            Explanation
        list
            Explanation
        of
            Explanation
        outputs
            even more explaining

    *Other Parameters*:

        only_seldom_used_keywords : type
            Explanation
        common_parametrs_listed_above : type
            Explanation

    *See Also*:

        `otherfunc` : relationship (optional)

        `newfunc` : relationship (optional)

    *Notes*

        Notes about the implementation algorithm (if needed).

        This can have multiple paragraphs as can all sections.
    *Examples*

        examples in doctest format

        >>> a=[1,2,3]
        >>> [x + 3 for x in a]
        [4, 5, 6]

    """
    pass


def newfunc() :
    """Do nothing.

    I never saw a purple cow.

    """
    pass


def otherfunc() :
    """Do nothing.

    I never hope to see one.

    """
    pass