Skip to content

信息论导论 — 练习

Download exercise.py

实现 nats_to_bits(h_nats) = h_nats / ln(2)。自测:ln 2 个 nat 应等于 1 bit。

bash
cd docs/information/overview/code
python exercise.py

源码位置

clone 后打开(相对仓库根目录):

docs/information/overview/code/exercise.py