packagehowto/src/numerix/__init__.py
2024-04-24 12:16:28 +02:00

29 lines
537 B
Python

"""
# Numerix
Fancy numerics made easy.
"""
# Functions defined directly in __init__.py can be imported directly
# from the package (e.g. from numerix import add_four):
def add_four(x):
"""Add four to a number.
Parameters
----------
x: int or float
A number.
Returns
-------
y: int or float
`x` plus 4.
"""
return x + 4
# Functions from the modules of the package can be imported into the
# namespace of the package:
from .addition import add_two
from .version import __version__