API
--Module-level docstring--
This module allows the user to make mathematical calculations.
Examples:
>>> from calculator import calculations
>>> calculations.add(2, 4)
6.0
>>> calculations.multiply(2.0, 4.0)
8.0
>>> from calculator.calculations import divide
>>> divide(4.0, 2)
2.0
The module contains the following functions:
add(a, b)- Returns the sum of two numbers.subtract(a, b)- Returns the difference of two numbers.multiply(a, b)- Returns the product of two numbers.divide(a, b)- Returns the quotient of two numbers.
MyClass
¶
--Class-level docstring--
Source code in element_array_ephys/docstring_example.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
method_a()
¶
Print A!
Source code in element_array_ephys/docstring_example.py
50 51 52 | |
method_b()
¶
Print B!
Source code in element_array_ephys/docstring_example.py
54 55 56 | |
method_c()
¶
Print C!
Source code in element_array_ephys/docstring_example.py
58 59 60 | |
add(a, b)
¶
--Function-level docstring--
Compute and return the sum of two numbers.
Examples:
>>> add(4.0, 2.0)
6.0
>>> add(4, 2)
6.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a |
Union[float, int]
|
A number representing the first addend in the addition. |
required |
b |
Union[float, int]
|
A number representing the second addend in the addition. |
required |
Returns:
| Type | Description |
|---|---|
float
|
A number representing the artihmetic sum of |
Source code in element_array_ephys/docstring_example.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |