Python package for custom fixed-point and floating-point formats
Project description
APyTypes
APyTypes is a Python library providing algorithmic scalar and array data types, both fixed- and floating-point in Python. The main purpose is to simplify finite word length design and simulation. Written in C++, the focus is on performance and flexibility.
Documentation
https://apytypes.github.io/apytypes/
Installation
APyTypes is available in the Python Package Index and can be installed with the pip package installer:
pip install apytypes
Running
The package can now be used as:
$ python
>>> from apytypes import APyFixed
>>> fx_a = APyFixed.from_float(3.5, 4, 4)
>>> print(fx_a)
3.5
>>> fx_a
APyFixed(56, bits=8, int_bits=4)
>>> fx_b = APyFixed.from_float(1.25, 3, 6)
>>> fx_a + fx_b
APyFixed(304, bits=11, int_bits=5)
>>> print(fx_a + fx_b)
4.75
Tests
Test dependencies can be installed by running pip install [.test]
and then
executed by pytest
.
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
apytypes-0.2.2.tar.gz
(314.7 kB
view hashes)
Built Distributions
Close
Hashes for apytypes-0.2.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c7700fe268ee748335c8e399683968b70b46e8681b63b35655ee6e6d042553 |
|
MD5 | 561bf3f362a6b07fae55964b523d7b5a |
|
BLAKE2b-256 | 1e60011e393146776c1cf99513e603c65c425f7a45d9d88f722b0f2f0f43e783 |
Close
Hashes for apytypes-0.2.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 078c761875ddb36d5d0bc475089871e39209155e3347917543554cb1f69ced8e |
|
MD5 | 65eec765b681dca970cdd369347c582a |
|
BLAKE2b-256 | 3f89fc74626c3dab0c5f0e024e82d2f2caf2d7313db573155cf5d81fca160f7a |
Close
Hashes for apytypes-0.2.2-cp312-cp312-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd90700abe4914ef4af4dfa0b704ec5c46d926ed844f7fb73da505f7c1f0fe63 |
|
MD5 | 434fa7aac78f88bfa790144c91ec8213 |
|
BLAKE2b-256 | b6b8ff0178bd12f96ff7951740b74e8ba6cd7e75ee31fadfb935d0cbd6840717 |
Close
Hashes for apytypes-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74e2254a317ce6f7dd839e227cd58650ba7459f7f291e97ddf01d0f0873bedd5 |
|
MD5 | a68512b0ff9202bbaa6f8c1aa8ad60a7 |
|
BLAKE2b-256 | b6db8fe1d0d84fd2b23c80302aeb10a2cabd765d939a6e0a8a4bae1364aa7cc5 |
Close
Hashes for apytypes-0.2.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 071d2c6b6d7d596beec86206d4ecc823bc91d972398917f242905747de326ec8 |
|
MD5 | 65e729d3697c740df8c2ed5e4a5063f4 |
|
BLAKE2b-256 | e4250f13939d367c6b9cbdbdc1aef381d605070c4236c87c648cf47f94dfb640 |
Close
Hashes for apytypes-0.2.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab0387bc7e6b5c24359b7299b6263e7ad8c3d81b1262d6011a7a58e6fda36d32 |
|
MD5 | 93231e628b48ca2df2bd6a54f8d68447 |
|
BLAKE2b-256 | 05ec8631f6dd762d03821c51d9ff5dbf39aaf96cc870ea3573043db2114c208a |
Close
Hashes for apytypes-0.2.2-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 282e7bbedfa57ae5579d7d2acd7e4f53672443e4651e0ecf07f8a37e23c3d032 |
|
MD5 | 94c1ffa16f496347e59ae0ca9ab94fd6 |
|
BLAKE2b-256 | 9aa0f89377f6c012b2d3687b0515707ee4795fa42c3d70eaa58421a15ed48b35 |
Close
Hashes for apytypes-0.2.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3555970a5b51f08d3236d288b9825c9b15b650c5b0b1cacf25d4922a02509e01 |
|
MD5 | 34047519e9d569b5a8407918e5712003 |
|
BLAKE2b-256 | 39c0bc9377bc1712360274a0614d7ad7ea7e5b96e4f1bb10e60c31ffd1642c91 |
Close
Hashes for apytypes-0.2.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7dbe5e387adc39aac486f8944dcabf07dcaacca457f26569d8e4cf61a134ab |
|
MD5 | 9a68d45f035db0b8593e153f843d793d |
|
BLAKE2b-256 | 072f9bc1f142bba18d66da488885d7d00fe5f342319ecbcfb02399f8a2863b06 |
Close
Hashes for apytypes-0.2.2-cp311-cp311-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b3fb8c9db60e2bce99b2e7b1028f2128bde814437cde67b233765b37d9a3d03 |
|
MD5 | e637a5e69b1b612202d085a089e83099 |
|
BLAKE2b-256 | 0ddc275db628999664941894f0c158e1d5a0abf5d81133aa505f945ad12ba2da |
Close
Hashes for apytypes-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7df2ff9cd0accfa7e6cb399f0ed86174492202a6ea17add9f5a81846c2778988 |
|
MD5 | bbc899066393487c692a0be5403cb28d |
|
BLAKE2b-256 | 47d2c2c9f38bcc8ed48eef0f73140b07a78e6b1e989cc7df2cafc5080cf9b847 |
Close
Hashes for apytypes-0.2.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516be3d2494eda83fee2b0d46daa53ffbb158d4e2aeda904b69afcde74c0b6a9 |
|
MD5 | 3b5de5ab20dd3d82efa8468c16b9bbb1 |
|
BLAKE2b-256 | 4c0047541e3db95e1e7e7ec7c13386f75453d570c2f9bb56a5b8e7f5441d715a |
Close
Hashes for apytypes-0.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489e27574405e06d54a31d4e223c73c951daf81823d86909411967b783b04493 |
|
MD5 | b507f1cf59434610a43d24633ffb7cf5 |
|
BLAKE2b-256 | ca303d614f5fecaf289ea5f97e6768679fc2e00c836ba95e6c8053fe33352167 |
Close
Hashes for apytypes-0.2.2-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38048fc65063665e1a697dabaa8f9c298f5544ee2f8e5410d3dfa7dc0bdbae1d |
|
MD5 | 7a3538ffc1c0b474130ee86c194e2e4a |
|
BLAKE2b-256 | 205f29bdc5128d33b1c453b7d5c7ab1139ecacdd0fc592fc090c6a999321cbf4 |
Close
Hashes for apytypes-0.2.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10b034bb689278ef2611265f86e4cc692e0f2148fbfa19c74e3657568344a83b |
|
MD5 | c7537897338bd0d70492473955df2f4f |
|
BLAKE2b-256 | 8a7332f405a4d577f2373a71d6db49f6f310640cfda08813d444ac0f67227734 |
Close
Hashes for apytypes-0.2.2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b31cd30487eaeff20d4941b3427139a002fbc0b42e27e410ab1de2f700bd57ca |
|
MD5 | 2a4e60a0a6238f771c4f9edfced87143 |
|
BLAKE2b-256 | 1f2831ec3b04a003a7b6fab61f82276d7d4768953eece150081a9e5d47009a5b |
Close
Hashes for apytypes-0.2.2-cp310-cp310-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a5ef850e14a7464dbcc32cbbab40bd5e3e56e88a89dcc5a3f36c01cf187942a |
|
MD5 | 28e622f73b1b2bd200e78857eb070161 |
|
BLAKE2b-256 | 52d117922356f27c8475d716a9ce4d2ad167276c4e88f80a25fc60f9aed9147c |
Close
Hashes for apytypes-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f8fdade719b7697c3590fc28eb900666ea77cbcaf8a0da944e78871f93fb66d |
|
MD5 | a014e1393c98a29060971bbc09d296d6 |
|
BLAKE2b-256 | 254d19b92e08831c318369b9a7b4983ba221d4a76d583462ac6c97b8dbb81ad7 |
Close
Hashes for apytypes-0.2.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d37d49cc17b5f24e5ff2a97427621ac05a02c11b25a8cfd421dacc94fe0da22 |
|
MD5 | 5dfeafd8e412fb8a31cda6f00985c05d |
|
BLAKE2b-256 | eb666bd538e6e46cac33d5904c674456d73f644a3401b19845cab450e8773ac5 |
Close
Hashes for apytypes-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9b5e663f76ec9e0f1db648bd0fcb3d8cad330af575dd725d30e86971b26549a |
|
MD5 | db656101f55fb1d8836c3ee0abd6ae2a |
|
BLAKE2b-256 | 2bfda0dbcae9eb7db11d92b0214e489e60584c3e7739a65de0884b0dea7c08b3 |
Close
Hashes for apytypes-0.2.2-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09663c86adeba154c842c3c0d80e474b0781d76468b3681570ef2f4d1573f9a5 |
|
MD5 | 090748a0aa5d4c6f64df1beb7ea62000 |
|
BLAKE2b-256 | 82566d3929bdaa39a692a2b827bbce8fbc08ba4d2bda0511b8c7ae4b7e7403df |
Close
Hashes for apytypes-0.2.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d277b87f7532064a338bfd251c2b96ced7a83e41e58a08205b612b89a5a6239 |
|
MD5 | 56df7629891e576a4cec461d42d3b0cd |
|
BLAKE2b-256 | 9ad7d5c0a5d268a7737cc1f0d8637b49b7928d4f3fa4a35da2d77bbce00c1787 |
Close
Hashes for apytypes-0.2.2-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b019f2e67edfefbd1f1ce2fb9597047fd574b797a25cd09e3663d48f94a9601f |
|
MD5 | 43228c593f76c9228efcf842e3b38dd7 |
|
BLAKE2b-256 | a72b265e99e8ce13f6b7438ef3994a26be34483dfdc009063f07d7c492edc58a |
Close
Hashes for apytypes-0.2.2-cp39-cp39-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b83b477eee8b57f6b2e23f08d711b16d6f5282c716577b98cd9bb884bf12bfb6 |
|
MD5 | 9df648bb18ea80c7a1d96f03fba97f17 |
|
BLAKE2b-256 | 473d97d247d0dcd5ca4706d4b166bd32830cd03f3de3e2a9e43ac8443d6c98b0 |
Close
Hashes for apytypes-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b124817137bb1ef48c7820c35073d1b2a38c0006710b532e644aa5f62025bab |
|
MD5 | 43bf669b6e47381fc689caf90cc24adb |
|
BLAKE2b-256 | 2d27bfe3c2c7f5c6c4401cbc0611865ab4ebce39ec8358442bac514b174f82d3 |
Close
Hashes for apytypes-0.2.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e32247ee4aac20ebd8b16a925af32074a66292b8fe00f710c4cba3ec026ae285 |
|
MD5 | ed7575733b8b1c46a1f491f36b107cce |
|
BLAKE2b-256 | 376143028caa3d5fde97fb9f8f06c7f48c7477b23c7fe7ecb2494116ac351aac |
Close
Hashes for apytypes-0.2.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f93060927ec3c66a70585d1dc71cc7013917b2261185e4f05fbbdf7c3a1a0b7d |
|
MD5 | 44a759c0409533372980ec5b167b4e48 |
|
BLAKE2b-256 | 04b0dab7b22d92eaa3104214da584ceaff6b1f405838ee2032720c65d2e1b352 |
Close
Hashes for apytypes-0.2.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68a5c66c301f025545b3ca5b7a33276bdd8012411a8635c70edf3cb6af44da6e |
|
MD5 | f055af8d305664dd49486edae2f3645e |
|
BLAKE2b-256 | a3f83c8cd6418a31266b83f8f9980b84ff328cf1247af1d67f3e51ffbfb24e8e |