module1¶
This is an example module.
Functions
|
Adds two elements. |
|
Sums a and b. |
|
Merges a list and a tuple. |
|
Sums two numpy arrays. |
Functions¶
- add(a, b)[source]¶
Adds two elements.
- Parameters
a (
int or float or str
) – First element.b (
int or float or str
) – Second element.
- compute_something(a, b)[source]¶
Sums a and b.
- Parameters
- Returns
The sum of a and b.
- Return type
Notes
The addition of an int and a float returns a float.
Mathematically, this performs the following operation:
\[c = a + b\]Warning
The code will not break if you pass two str.
- merge_arrays(a, b)[source]¶
Merges a list and a tuple.
- Parameters
- Returns
The result of merging the list and the tuple.
- Return type
Notes
Do not forget to respect indentations when changing line.
Deprecated since version 0.1.0: merge_arrays will be removed in pyretem 0.2.0, find out another way of merging arrays.
- sum_np_arrays(a, b)[source]¶
Sums two numpy arrays.
- Parameters
a (numpy.ndarray) – First array.
b (numpy.ndarray) – Second array.
- Returns
Sum of passed arrays.
- Return type
np.array