Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 495 Bytes

File metadata and controls

21 lines (16 loc) · 495 Bytes

lcx: 2020/01/06

This is a quick tutorial example to show how a python package is built.

  1. Structure of the package;
  2. Necessary files: setup.py, _init.py_.
  3. Specially, one needs to pay attention to the code in__init.py__.
from .Gaussiandistribution import Gaussian

With this line in _init.py_, one can use

from distribution import Gaussian

to import Gassian directly. Otherwise,

from distribution..Gaussiandistribution import Gaussian