Skip to content

API

Multiply a value by a given factor.

This is a simple example function intended for use in documentation generated by mkdocstrings.

Parameters:

Name Type Description Default
value float

The number to be multiplied.

required
factor float

The factor to multiply value by. Defaults to 2.0.

2.0

Returns:

Type Description
float

The product of value and factor.

Examples:

>>> multiply(3, 4)
12
>>> multiply(5)
10.0

Add two numbers together.

This function is documented in a way that mkdocstrings can automatically extract and render.

Parameters:

Name Type Description Default
a float

float The first number to add.

required
b float

float The second number to add.

required

Returns:

Type Description
float

float The sum of a and b.

Examples:

>>> add(2, 3)
5
>>> add(-1.5, 0.5)
-1.0

add(a, b)

Add two numbers together.

This function is documented in a way that mkdocstrings can automatically extract and render.

Parameters:

Name Type Description Default
a float

float The first number to add.

required
b float

float The second number to add.

required

Returns:

Type Description
float

float The sum of a and b.

Examples:

>>> add(2, 3)
5
>>> add(-1.5, 0.5)
-1.0