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.0.tar.gz
(310.6 kB
view hashes)
Built Distributions
Close
Hashes for apytypes-0.2.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2a947e4bd09d955635c1e36934fed989fd9ec2e11d3a0cbd250edddbcda6d80 |
|
MD5 | 3de808f141e386591975874cc4797a45 |
|
BLAKE2b-256 | 1138a21634ea37e1d27d11d1bce389b1880de34365c752c83223a4f893b4a501 |
Close
Hashes for apytypes-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9624bec64c38fc3f65c0666f9feb3fc71c1f9f0f1b2aba496ec2a25209b719b7 |
|
MD5 | 3d5cf912c2fbd395f745946cf788d8e6 |
|
BLAKE2b-256 | b0e7d2df3285ef48fb244b6966e4c11834de19e40c189575ce40eeef63d562f4 |
Close
Hashes for apytypes-0.2.0-cp312-cp312-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed8c6bb22da481e1b28828e978ceb7136839eaf7bc7c986e6132fbcbca755ec2 |
|
MD5 | ad44f7a5457e668dc4a27d6d72c58e0e |
|
BLAKE2b-256 | b88312aea88e2226f788a46e872d83ad8868a4ad6c2dbf6e7a37db665b76d863 |
Close
Hashes for apytypes-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44f2b330360020ca966ee1a974b85738d954daf18431542810e69b6fb74e6d13 |
|
MD5 | 1df6a6e63fde0b25a85fc4a8c9f5e1a4 |
|
BLAKE2b-256 | 0f97b6b40ade4d301f8738444a8dc7b5ee75d507670dbecbbbfcc04426ddd189 |
Close
Hashes for apytypes-0.2.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77e4ae828576fb52e324abb3c5fb9d996d335f6a4485efa5e8fe1fa45812cb81 |
|
MD5 | 051dd0266b86ef4b40f4463df6e4791a |
|
BLAKE2b-256 | 2b82ac7855a0a07a87700cca21e146377847ff1a014064df5a12dfe0867a9009 |
Close
Hashes for apytypes-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c024b2195c69e5328139293cb84e7bef39cf0425a3b1b9348f68e0f69db791c4 |
|
MD5 | f7f6e6426e9540f187372e43004ffb95 |
|
BLAKE2b-256 | b895aa05f3c7943bf5f9fbaad32cad93a57888065c6cbc0103cf6559c1794c91 |
Close
Hashes for apytypes-0.2.0-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8199315d1e518b01ce2c0765f307b4978cd3609e5fd9991fecbf8294b3fc6ebd |
|
MD5 | fecb840bd33bcbab595d97af3b9f4064 |
|
BLAKE2b-256 | c1f99e7ac757ad5a89254155a25467bf5ff9fb7a20016fc6850b4174743fbab8 |
Close
Hashes for apytypes-0.2.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62675eb53708198af7f47f0e3b8481ce4138e5f05b37e141de14393ebd47454 |
|
MD5 | bf28384431c7ce8cb39907f90891fbf1 |
|
BLAKE2b-256 | 5b6e1a5b5a8c579c9a65b65c85d8ff28563493fbcc0b9e8b947e6d8087a3eed8 |
Close
Hashes for apytypes-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ddce539bc7fdeaea0765c538ec9546ba79b9f39e9acc377411b76beaa21993b |
|
MD5 | e3d2e76d2ee24bc9e8018c3b79e21bbe |
|
BLAKE2b-256 | b3245ef91782491468c830cf38a2b33a5e0d1ce7c5d79f44d1560eaf2c19ea8f |
Close
Hashes for apytypes-0.2.0-cp311-cp311-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d75368763bd87fe1711d25b51271abdfb0dae912456ca48a045e54ce11203aa |
|
MD5 | 8127326121c7a4cabc2f42f5c3151301 |
|
BLAKE2b-256 | 4305a252d63ae5627f83ebff9fe4a78453c1bb76ac3c47ad8466e2d69f4fd442 |
Close
Hashes for apytypes-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4914352fdff18e4d4438f605b8eaa2c95284e475604864f9f73bb47b49ed7e0f |
|
MD5 | 11bbf1c8b0ac42e87e9c5a4b44e937e1 |
|
BLAKE2b-256 | 462640669a527243e8e21070bb145d07d9a275e86988c25d07b7e77ba40e2d46 |
Close
Hashes for apytypes-0.2.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d96e393185b99e623f2ee64608b8d6fbd2ba1805235b6897d89bd8877589fe21 |
|
MD5 | 7fd3f14e826d20d39a3ee6af0b7a0c41 |
|
BLAKE2b-256 | 9d93833fb78675f9c9e43c7cd12e9f944b25ffa57890a2e9134770e687bf9450 |
Close
Hashes for apytypes-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 991b02a35cc539c99c14f4a3d7a957034fe456673f66f99035d628c1984f8ccc |
|
MD5 | 6abfba048cfbf11b21b1be9470ce1758 |
|
BLAKE2b-256 | b8e45789c5d888756b7daf5bf3105b0286d0331dfaf75deb5eac319b826dbcc3 |
Close
Hashes for apytypes-0.2.0-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c186cd7c83a9d0a13d53f457aad1eeea56256dcf228426f0d6cbbdae1f1b1333 |
|
MD5 | d7ca2499d9859ae643add540455b2274 |
|
BLAKE2b-256 | 5eb7dfb08390e4fd5e360894b8f3b0abb03a245727bc9dedc32b76664ab94a61 |
Close
Hashes for apytypes-0.2.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0723fbdb2b48c16a2cb2ba42e397d04ef8b2f9905fb19d5fca21d46f4e07f349 |
|
MD5 | 0c1c8b5671affe15148620745239975b |
|
BLAKE2b-256 | 2e0d2e6224c7823a5d59a8752d2fbd832f7d66c5605b0488d3b287c2befd4fd7 |
Close
Hashes for apytypes-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a89aa86bf4b66900904fe343e3239fefa3ddaaebf8f213721e23d54efe44ddf4 |
|
MD5 | 8ab9346119e35f5af90099cb1a5ac548 |
|
BLAKE2b-256 | 0400e5be7e5529211415472977ec3ccf60a25e4c3c6941dc558d49dd4f27badc |
Close
Hashes for apytypes-0.2.0-cp310-cp310-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57cf2fa31f297a70ba7f04aa918d42d8c6d483e1269dc58fc330f441f4dc3169 |
|
MD5 | 10af855dabdfa7936c0e565d63a89ba5 |
|
BLAKE2b-256 | 5aace2052a519c9527e3e46d7e8a0807df55e14c8ba5c47e65a44ba0c8b5c18e |
Close
Hashes for apytypes-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaef8b4798b2860afd2787201b9495d8f7b5ea9dcff78b7e95eec9a730623e5b |
|
MD5 | a18aec84f8db06f146ec287ff342a19e |
|
BLAKE2b-256 | 6f978f213189e7b78b2d4b54a9f44a5dbc4550ff0a53da52e122dd7cd22c70e0 |
Close
Hashes for apytypes-0.2.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80f40107b17324202477cf87f082969ab60b53e521d82edad0fb05564232482d |
|
MD5 | 121ad9b902fb9988818d62ac7f6a09d3 |
|
BLAKE2b-256 | fa07ce0218e06fdd241940bbc73c95b85fec583851f22c5bfe3e1d629f54f45c |
Close
Hashes for apytypes-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d7b7330daddaddb16c0a9b47a63532ced7423e71c311bd38449d025eb1dd801 |
|
MD5 | 4dccc8c3d121d52a01d9699ba40e9bea |
|
BLAKE2b-256 | 98cd2b05a3f4eeaf20f3c6f691ae22a77ec535b05bfb411da9cf5f82160b45da |
Close
Hashes for apytypes-0.2.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a065ef65d0c5d1eb031676ddeebb7e0a11c4f92bbc1d4b6b360cedd3ea548932 |
|
MD5 | f768ed48182fa2e0a52a9df257a334b9 |
|
BLAKE2b-256 | b5b7db3d2c552a776b6904246dfc453b120e640660b94937353a052d5fe37e14 |
Close
Hashes for apytypes-0.2.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d803a3adb0f4cd9ffbe7869f2fbe2bea7ab6a82d159ad483176b2e9b6c990cf2 |
|
MD5 | 89c97d135a4f2ead0436cad673d5994e |
|
BLAKE2b-256 | 03c3271ac406a88a5aab7742ee76f92118b06a1ee876dfefe119f4e57d08d496 |
Close
Hashes for apytypes-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a17becf302acfe598530f748170f0800863c3454be189fd6db3b0eb2f3422c50 |
|
MD5 | b7bb8748179453e2c0977557c9f2fdba |
|
BLAKE2b-256 | 44995ba8b3126ab00e685f2ab3cd368c7a6b1ea1e613837a920f04db91a86194 |
Close
Hashes for apytypes-0.2.0-cp39-cp39-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d69b6985bbd86d999284e238f9c9545b9b2c993c80c226e8595a851a040213b |
|
MD5 | b3b4e819f08db6a52ea9b76a24cac0c1 |
|
BLAKE2b-256 | 7729017dd2500d1b93f2d63cf85fcfb08d9a32901a3eef901ebfd144a22091e4 |
Close
Hashes for apytypes-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 528f964a5ef10b2309514904feaa4262ec026fd6b95bd2f5a652d226bf4cd831 |
|
MD5 | fa7e0ca4c411bc2ae342eda721b400cd |
|
BLAKE2b-256 | 60292df1777487900a7b0e4ef9bc5e8ffd9852ddc90d7b0b77630e9fc1ac1426 |
Close
Hashes for apytypes-0.2.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70a7bd82cca49d90b5e20a4fe9d34f8ee619516fa65aefea391487cba7a3c50e |
|
MD5 | a4f55dfa173ee242d2f6c1e015a98e74 |
|
BLAKE2b-256 | f51578c0469835843e5ae7d48b6a31447eef43dd7672229a8a986465be7813be |
Close
Hashes for apytypes-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cec6c87cc90ceeaad370e583dbba768070f3793381f1498a6b21e24de96d6a4e |
|
MD5 | b66aa749b3ef6cd683b114cafff412d4 |
|
BLAKE2b-256 | c62e2e5afa31effaf8e753acf2c40228eef85ef402b5c186dbba540ed4a82fa1 |
Close
Hashes for apytypes-0.2.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 313b6835df05a7ca699493af19f6028991a15527fd32eee4ee6b020c5a836fb3 |
|
MD5 | d546eb2c08ebc8faec550bae6030e274 |
|
BLAKE2b-256 | a78ba6e9dc9a717c2ec739972d981d254c06914614bc1a8c8bd2afbd8cd74db3 |