Skip to main content

Liknorm Python wrapper

Project description

liknorm-py

Travis

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


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.2.3.tar.gz (6.5 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.2.3-cp38-cp38-win_amd64.whl (15.5 kB view details)

Uploaded CPython 3.8Windows x86-64

liknorm-1.2.3-cp38-cp38-manylinux2010_x86_64.whl (35.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

liknorm-1.2.3-cp38-cp38-manylinux1_x86_64.whl (35.2 kB view details)

Uploaded CPython 3.8

liknorm-1.2.3-cp38-cp38-macosx_10_9_x86_64.whl (12.6 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

liknorm-1.2.3-cp37-cp37m-win_amd64.whl (15.5 kB view details)

Uploaded CPython 3.7mWindows x86-64

liknorm-1.2.3-cp37-cp37m-manylinux2010_x86_64.whl (34.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

liknorm-1.2.3-cp37-cp37m-manylinux1_x86_64.whl (34.6 kB view details)

Uploaded CPython 3.7m

liknorm-1.2.3-cp37-cp37m-macosx_10_6_intel.whl (16.4 kB view details)

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

liknorm-1.2.3-cp36-cp36m-win_amd64.whl (15.5 kB view details)

Uploaded CPython 3.6mWindows x86-64

liknorm-1.2.3-cp36-cp36m-manylinux2010_x86_64.whl (34.6 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

liknorm-1.2.3-cp36-cp36m-manylinux1_x86_64.whl (34.6 kB view details)

Uploaded CPython 3.6m

liknorm-1.2.3-cp36-cp36m-macosx_10_6_intel.whl (16.4 kB view details)

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

File details

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

File metadata

  • Download URL: liknorm-1.2.3.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for liknorm-1.2.3.tar.gz
Algorithm Hash digest
SHA256 124bae3fe253b3c951ddc89af2067e63a5be9d5afa45181eb95a64a1a59effae
MD5 c4ffba72a589f679bf663eb9fd6f5d96
BLAKE2b-256 30068e898a36d20125c70aa722c3422162aa26a097187c85a9c3f0b45ab0a031

See more details on using hashes here.

File details

Details for the file liknorm-1.2.3-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: liknorm-1.2.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for liknorm-1.2.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c0fb4d7a2beb68a80674997fede4c4ea69534977e989b094c543ce5776b13da5
MD5 a5818fc7020c3dd0f333dfe9674b875d
BLAKE2b-256 c0e51994746d2b14c74bd138445880a1137fc86e401589defd5c2473361b82d3

See more details on using hashes here.

File details

Details for the file liknorm-1.2.3-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: liknorm-1.2.3-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 35.2 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for liknorm-1.2.3-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c5951aef05f007e3eeffbf57a5762e4ef47ca004508080cb55be398888c91bc8
MD5 d816a411da84f43b292a91168106b84d
BLAKE2b-256 838fb65bc5d1a9aeefe8be5775ef223ba957cbd99e2501d2b64644b995ac2c67

See more details on using hashes here.

File details

Details for the file liknorm-1.2.3-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: liknorm-1.2.3-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 35.2 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for liknorm-1.2.3-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a785ed78697b3e54ca0288721f954c78dc44ec9bb2fda60fc6fd5aebc59e1738
MD5 3aa663cda6e55f668263d276ebdcdd30
BLAKE2b-256 50d8670034b835dbba8b6292bb8249866ef9ea0fa5d6dcc8bd47bc043d33c33d

See more details on using hashes here.

File details

Details for the file liknorm-1.2.3-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: liknorm-1.2.3-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for liknorm-1.2.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4eab8eb3c04e189ffff5f50c05494e1efee8804e03debed195c5163431bfbf25
MD5 2573cb7c4889ac82420dde46cf8f0076
BLAKE2b-256 bfab359b63a76412b1eb7929181acb2d658f38daa48bf11e9d38bd3e004a3990

See more details on using hashes here.

File details

Details for the file liknorm-1.2.3-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: liknorm-1.2.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for liknorm-1.2.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 bc82065a21f9791bbefe791774259898eae96db9ea31ea07e2f2690d5b8caa6b
MD5 9e3e4db21acae69d03ae84b6c86b5d62
BLAKE2b-256 b29632de128f14fb1bad1f41755a449e099e11ca18f44ccc5b7d06e59671e19c

See more details on using hashes here.

File details

Details for the file liknorm-1.2.3-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: liknorm-1.2.3-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for liknorm-1.2.3-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a1c70cb53839ec58eb527d53b74e63eb415d35bf1eecaa7405d89a42ab4ab5ac
MD5 04e2e8f3874992abb9f61fc37f582bcf
BLAKE2b-256 90616d45d1b081fbfdbb746a06893f66743c89ad696b0c883a0a15d0e22a4b9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liknorm-1.2.3-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for liknorm-1.2.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 37d9565c6d61dc5e16f46d824b918c54e206bc6f72beeb057ca6af16fdfb28f5
MD5 3aa70b9b71737a2458d9da8d3d798a58
BLAKE2b-256 578b93d34d9ea35de7e65164816838493c0da7d222a15780a3d072dbc43f0ecd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liknorm-1.2.3-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: CPython 3.7m, macOS 10.6+ Intel (x86-64, i386)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for liknorm-1.2.3-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 f9be87403ab21b1ddf7d0ca7ad0ae824648fb2f01378b492ee620535b3a7fd7e
MD5 c76596832c5f49556c1dce45fbd4669c
BLAKE2b-256 ddb53d2afe30d098895098a59901cf1f7a9614add8021f5b0472810609ce8089

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liknorm-1.2.3-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for liknorm-1.2.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2e48082a63f42ea78c836b1ace2433f28888b1ffe0d37f4a843014d01b1443ba
MD5 74c5754bac6c71c5def13f0ac37f6f2e
BLAKE2b-256 7b952585315372900b9f7a9c5ca765a7a33535ad4cd58bad06abe82195e95ee5

See more details on using hashes here.

File details

Details for the file liknorm-1.2.3-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: liknorm-1.2.3-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for liknorm-1.2.3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b6ae3837fc85a6f478626ec43bb35420f7124be32347b1cedc9ebcdae959f768
MD5 ed3fe16150c0a0f9bfdc6ad4490d8705
BLAKE2b-256 ee466d4f50f71de36eb3a12763062effe9623f43ba88569d0aa9bb30259625ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liknorm-1.2.3-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for liknorm-1.2.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 74efd34635e8ec415bb5c5b82ce91def98badbc3c0ae4512b0f5f692cc65b1e3
MD5 4d4224d7551ae9cdcc09230a15109113
BLAKE2b-256 c335bc1be2523f45c68b65cb4757d06a497ec565ab8b1c890541eb5bcc6728b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liknorm-1.2.3-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: CPython 3.6m, macOS 10.6+ Intel (x86-64, i386)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for liknorm-1.2.3-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 69705cd35666d159d96baaed65baa200be516eef24418e5f48b723ef339a7888
MD5 f8924c30bef99ca2d6766c1b1f563f08
BLAKE2b-256 7c606ed81ab9dd2ba7be30f385a3cf31f69d12bddef505765dc876fa5946ba0c

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