cmatools.examplesubpackage.example_cmatools

NumPy style docstrings adapted to highlight the selected CMATOOLS style.

This module demonstrates documentation as specified by the `NumPy Documentation HOWTO`_. Docstrings may extend over multiple lines. Sections are created with a section header followed by an underline of equal length.

Example

Examples formatting, including literal blocks:

$ python example_cmatools.py

Section breaks are created with two blank lines. Section breaks are also implicitly created anytime a new section starts. Section bodies may be indented:

Notes

This is an example of an indented section. It’s like any other section, but the body is indented to help it stand out from surrounding text.

If a section is indented, then a section break is created by resuming unindented text. See also notes in the wiki: https://github.com/cma-open/cmatools/wiki/Naming-conventions

This file has been amended to include code style examples and further functional code, so the module is well covered by tests.

See:

Module Attributes

DEBUG

int: Module level constant documented inline (Default: True).

CONSTANT

int: Module level constant documented inline (Default: 21).

module_level_variable1

int: Module level variable documented inline.

module_level_variable2

int: Module level variable documented inline.

Functions

confirm_version()

Print package and numpy version numbers.

example_generator(n)

Yield the next number.

function_with_pep484_type_annotations(...)

Compare if param1 is greater than param2.

module_level_function(param1[, param2])

Verify is any parameter is greater than 100.

Classes

ExampleCMAClass(param1, param2, param3)

Example class.

ExampleClassAnother(param1, param2, param3)

An example class.

ExampleOtherClass(integer, quality, ...)

Example class.

SimpleClass(param1, param2)

Simple class object example.

Exceptions

ExampleCMAError(msg[, code])

Example error class.