Liknorm Python wrapper
Project description
liknorm-py
Liknorm Python wrapper.
Install
It can be done via pip or conda.
Pip
pip install liknorm
Conda
conda install -c conda-forge liknorm-py
Running the tests
After installation, you can test it
python -c "import liknorm; liknorm.test()"
as long as you have pytest.
Example
>>> from numpy import empty
>>> from numpy.random import RandomState
>>> from liknorm import LikNormMachine
>>>
>>> machine = LikNormMachine('bernoulli')
>>> random = RandomState(0)
>>> outcome = random.randint(0, 2, 5)
>>> tau = random.rand(5)
>>> eta = random.randn(5) * tau
>>>
>>> log_zeroth = empty(5)
>>> mean = empty(5)
>>> variance = empty(5)
>>>
>>> moments = {'log_zeroth': log_zeroth, 'mean': mean, 'variance': variance}
>>> machine.moments(outcome, eta, tau, moments)
>>>
>>> print('%.3f %.3f %.3f' % (log_zeroth[0], mean[0], variance[0]))
-0.671 -0.515 0.946
Authors
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file liknorm-1.2.10.tar.gz
.
File metadata
- Download URL: liknorm-1.2.10.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce1fec274584e52ae8879aec9fb9849e9081d0c99485a45b87266ee1f6c803d7 |
|
MD5 | e25edf2db52e666d661aa943e0d26917 |
|
BLAKE2b-256 | 8cef36617aa24e72591e59611b72b0f9f6ae2c5d368ab6a4ae7fa0760ef9ffb7 |
File details
Details for the file liknorm-1.2.10-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 74.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1fcd35bd6e020622e6e8eb227feae327faa119c909c35576546687acd5f2253 |
|
MD5 | 599dad47e9cd9c94c9dfd98073a18226 |
|
BLAKE2b-256 | b639b2f5c13348d99668d48ed92aa2cd4428c53fb14504a84e23ee7fe8bf7d3f |
File details
Details for the file liknorm-1.2.10-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 147.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8e6c144dcc4f1d59748ad99e274004d2c49f3a8658e03573e57682dfd6b7ecc |
|
MD5 | fc0ac6ef9c63e08af128c2e10bc31f0e |
|
BLAKE2b-256 | 092325ae21d60f7122250d1344b110293d533b5a5525ec8c6740bdafd8fbdd11 |
File details
Details for the file liknorm-1.2.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 143.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f385d1004184f7ca1e51b95982929091e0f86adb52a2ff93a02058a52bb019c9 |
|
MD5 | e4e0564c92cc3efcd3f911ca11df1200 |
|
BLAKE2b-256 | 10168bf0635f0adfe0612499cb2d43f8f53e805fb27881cea0693fe4d9e1a388 |
File details
Details for the file liknorm-1.2.10-cp311-cp311-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp311-cp311-macosx_11_0_x86_64.whl
- Upload date:
- Size: 88.2 kB
- Tags: CPython 3.11, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab75b3199bca3df7cbc0d4e920f5ab38413bc94e02000fce5bab3888c9ab523 |
|
MD5 | c4dbb33a47eb8dc2dafbd4135328e1e3 |
|
BLAKE2b-256 | e67157d43157cb94fd2218ac7c8cb1ce9a63dc647d73842a68e773fefead8a89 |
File details
Details for the file liknorm-1.2.10-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 57.6 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fb484bc51111fbcdf7a4539dee30d0fad2b584d88f0ef64fb1815c4a949aa81 |
|
MD5 | eda373c03e37597fa7d8028e21024376 |
|
BLAKE2b-256 | 05ddd00ec67eb0b6bbc1d13408a83213838b6fe8545085aa3e11fe3b056f8632 |
File details
Details for the file liknorm-1.2.10-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 117.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d84f7a6a4c1a77a2fad80cd53ec8d95e778ac9e44e7687156ca0e1774230be6 |
|
MD5 | 8f8b1f32ff48627ce8c93b9723eae9ec |
|
BLAKE2b-256 | 72e3bd09f41240157d74b02ac5707e368a111cc739c60ed98708681643709c46 |
File details
Details for the file liknorm-1.2.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 114.7 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7548914df61fcdf64cd0b7197e3b1cf01c90ee5aae0ce2a8f1f97f720a69fda |
|
MD5 | 08a35624e040d00ed05c3445da3a74dd |
|
BLAKE2b-256 | 7c9acb36db122be10cd020de0a72c1c17d191016d2b4e36097488571e42ba261 |
File details
Details for the file liknorm-1.2.10-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 72.6 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cce7639070efc4b9b4dbbae9d403cf25c3772b0ebaddb2e8bb7b28ab1a866089 |
|
MD5 | d2e0165548afb7510fec0a5fed2e665e |
|
BLAKE2b-256 | b53cad0f4e687a0aa147cfde044bfa890fe7d195f320d9d39ee5173a68739a9e |
File details
Details for the file liknorm-1.2.10-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 41.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11ae3e46898963cf908dcaf06531151d0ec7c551a11ee59e70ee376e681d9544 |
|
MD5 | 83113bf67447a9fba188a4fb8eb48368 |
|
BLAKE2b-256 | 86ce7dfedbb237c307b8e8b2b133ff4f221ac1c36e933612cb1295a4149e3f47 |
File details
Details for the file liknorm-1.2.10-cp39-cp39-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp39-cp39-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 88.2 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22eb130bad9880f38a68b39faf7dae01aaeab9046158d38fcb61f22d6673e643 |
|
MD5 | a1da10dd2b72eedf12234a862a43544a |
|
BLAKE2b-256 | f1cdc1e2cc9d1e16ab2d87efb3dd2baddb4d8fb6dcd5609345551638986c7ed2 |
File details
Details for the file liknorm-1.2.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 86.1 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2882ce7bb2ccf85d1d94960dc8796342eb00d155e8436d47b552140fcc29cc8 |
|
MD5 | cc2fc803bc9860d10bafe45f750fc5f0 |
|
BLAKE2b-256 | 8ec087b332539e8a36effeedb1718b8af445f367123b471ae1629537be281901 |
File details
Details for the file liknorm-1.2.10-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 57.1 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf5ee88dacf57f26d1ae7f951c885bda32b5972b693bf3b19c1522b57656a499 |
|
MD5 | c51baabbb1054188045023f71529a0fe |
|
BLAKE2b-256 | 2ea89ce3cd247ccdabc9df2d17b3a309306661fc34ff0ee599a6b81736811b3d |
File details
Details for the file liknorm-1.2.10-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 24.3 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6577fd76257bc254fe8da0afcb6c84cb842d9c83d743fef6612ac60b7bbcebc |
|
MD5 | d211928fc34ee0faebe663d2ad813a7e |
|
BLAKE2b-256 | 347b45733e8d2c0918cd02951a710e10a6e0a7c9c336b93a67cb6107f11852a9 |
File details
Details for the file liknorm-1.2.10-cp38-cp38-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp38-cp38-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 58.6 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0db6e22dbcada6e3421fab90c4ab0eca7d5f490a5613569ac4e7bebf13d72d51 |
|
MD5 | 604c99ed9505cb6a3e5a1ba8acc95fde |
|
BLAKE2b-256 | 351d4f9b6935ed2b66bf548cb0874af78b474deb8b65410b9ae49ff685c364a9 |
File details
Details for the file liknorm-1.2.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 57.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be9b731239c6afe0b619ac84458d183304abfe5556b3b78fbcc81279e5ace1ab |
|
MD5 | 31c129b66a2e2f2a0efe05e735e36594 |
|
BLAKE2b-256 | b84b188fb1e0245343ca69388e34532e21f8592f8ad43ab60ff81ff68b80c6f9 |
File details
Details for the file liknorm-1.2.10-cp38-cp38-macosx_10_16_x86_64.whl
.
File metadata
- Download URL: liknorm-1.2.10-cp38-cp38-macosx_10_16_x86_64.whl
- Upload date:
- Size: 41.5 kB
- Tags: CPython 3.8, macOS 10.16+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e71c751f1cf5ee92f76c429b05e873b1ef32c91a87bfa8325de2c97d475ce7f2 |
|
MD5 | 92439abfd390066b5fef382c015610e3 |
|
BLAKE2b-256 | a233bb5362b7137947293c9d0914972351cd937040989113a1736d9723e481ee |