"""Example of embedding IPython within a programm."""

import numpy as np


def some_calculation():
    """ -K for missing doc-string here ;-)"""

    x = np.arange(10)

    # some complicated computation: ;-)
    y = np.sin(x)

    # decide to look at the stuff while running
    print("Try to plt.plot via:")
    print("`import matplotlib.pyplot as plt; plt.plot(x, y); plt.show()`")
    from IPython import embed
    embed()

    print("Programm continues with other important computations ...")
    z = np.cos(x) + y
    print(z)


if __name__ == "__main__":
    some_calculation()
