Skip to main content

Liknorm Python wrapper

Project description

liknorm-py

Travis AppVeyor

Liknorm Python wrapper.

Install

The recommended way of installing it is via conda_

conda install -c conda-forge liknorm-py

An alternative way would be via pip. First you need to install liknorm library and then

pip install 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liknorm-1.1.10.tar.gz (6.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

liknorm-1.1.10-cp37-cp37m-manylinux1_x86_64.whl (31.4 kB view details)

Uploaded CPython 3.7m

liknorm-1.1.10-cp37-cp37m-manylinux1_i686.whl (29.9 kB view details)

Uploaded CPython 3.7m

liknorm-1.1.10-cp37-cp37m-macosx_10_6_intel.whl (14.4 kB view details)

Uploaded CPython 3.7mmacOS 10.6+ Intel (x86-64, i386)

liknorm-1.1.10-cp36-cp36m-win_amd64.whl (26.3 kB view details)

Uploaded CPython 3.6mWindows x86-64

liknorm-1.1.10-cp36-cp36m-win32.whl (23.2 kB view details)

Uploaded CPython 3.6mWindows x86

liknorm-1.1.10-cp36-cp36m-manylinux1_x86_64.whl (31.4 kB view details)

Uploaded CPython 3.6m

liknorm-1.1.10-cp36-cp36m-manylinux1_i686.whl (29.9 kB view details)

Uploaded CPython 3.6m

liknorm-1.1.10-cp36-cp36m-macosx_10_6_intel.whl (14.4 kB view details)

Uploaded CPython 3.6mmacOS 10.6+ Intel (x86-64, i386)

File details

Details for the file liknorm-1.1.10.tar.gz.

File metadata

  • Download URL: liknorm-1.1.10.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for liknorm-1.1.10.tar.gz
Algorithm Hash digest
SHA256 c278a7f037a5616648b98bd3d61ecbe2bdeff192cfed6cb5bca62717806e8bef
MD5 069777cb78b745f5f74a4f6ab779c6ea
BLAKE2b-256 108e5ac6dab87aa3067dd7b75cafba64a4551c878bf7281f5980c67c59e1bec2

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c9da81beaab0f1ee79974468e77f132a214926d3e4329e26e335d265c6e3fdce
MD5 53ea14dbbc07be5a517e32850cbcd4ca
BLAKE2b-256 f8971d6a5520fbd7151ef043d63ddee13c8b7d66fa86e5affc80495071ddad2e

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp37-cp37m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 f2d49217e26577ce3d0641e3aa9f2f21dc712f7515b95c1db9ba2386f739197f
MD5 d4435cbea1b330d2bd8a64735b5ef5c8
BLAKE2b-256 f821dc044d433a44f8810820ed7189f0720f13e5c21b94550dce931267016f03

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 db90c724c9d773fefa2ccf0d918be8bc61fd914db738fc136f02f35af01fb57f
MD5 6a5f46d8a3290f5465a9ce1d03f5287e
BLAKE2b-256 b6e6fbc24b628fb1722fdfa424c5f701b1db72f99d47585e00b38c5833171347

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 80c3ec09c15d9091cc6fb15cf21b6667706fccfc9f8b1134d552f718d0492b1a
MD5 55254e785155c663e413beb8ab845028
BLAKE2b-256 cd4f4a3d54f9298e9a1f892c5527257844d8f883fdc4183a3539da7d8a0fe6c0

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 c35957ec52b61985fe1a2d6464c77511be9457ff78abbedee1da5d1482177b4e
MD5 9509708fb880b553f7e4b6eae1d41aff
BLAKE2b-256 ebc868aa874bdb2822823f10c919af6a1e3511ed71b53cacb1cee54da3f9fe3b

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cc50dcb1e70e69c4767aadb0bf7db507ef85960c067992e442e4e2fc1fa89c06
MD5 e118b6b7ed29fd21749c7cf3b44906aa
BLAKE2b-256 ef8704d5cb7b7ed947c2f6590200355b14841ba5bd055b69b65307639bbbd48b

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp36-cp36m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 c2ebbbab8e3f0acc4324701223df22b3164f5256f1dee1c70b32fdb242f00560
MD5 b0f58f7a5f2fa3926c3f1f65108c74a6
BLAKE2b-256 533dec8aae858ee12d92b5e20dfe47f3115e4b10d6a10a12a822b9eaf03974e1

See more details on using hashes here.

File details

Details for the file liknorm-1.1.10-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for liknorm-1.1.10-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 28f363d6b1aa7c50e668273e8c647780175f0d7769f0950a2d494df74238771c
MD5 d4f3d688e5e79d1c30de0e764833d2de
BLAKE2b-256 aee8d8d312661bf93cc957f6421f38837ef45bac959c1dc5f78032f74c6a5c83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page