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.1.tar.gz
(313.9 kB
view hashes)
Built Distributions
Close
Hashes for apytypes-0.2.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 543444d801e08c5b459652700eeefa3208300fe1da7e7c2da6a6675965acb370 |
|
MD5 | 7fc446e683b464ab3981dbb884a371eb |
|
BLAKE2b-256 | 6708bb8fb46f59fcf5671074c5b22dd01ef184a6e6ec3e94fb961f490619c87a |
Close
Hashes for apytypes-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc510b9d061e450bd50dc972b85edb6a772a6812e48031caed9a774a260d0f6f |
|
MD5 | 0c091667582b85bf0932e9a16ac88d73 |
|
BLAKE2b-256 | b084085b9d07b6d98e4171fd54ccb9d50a650e238edc199326f4d5d4bdbc15a3 |
Close
Hashes for apytypes-0.2.1-cp312-cp312-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516545ca16a7bf5deb52e81e0bf269e820bc678d7735e19f8832f4b568bb87c7 |
|
MD5 | 9815f2638058698923473042bbb36fe9 |
|
BLAKE2b-256 | a74c97ac727ece6a232596a10e55c503cf943a95f3fbb388f4f3db9f7270121d |
Close
Hashes for apytypes-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd105d6f6c1c73f1fde1ef7d2609fefc3549cdd52696fed2dc0f04d4697ca699 |
|
MD5 | 8d5737e9150d70b8af6d1f7ba91d6957 |
|
BLAKE2b-256 | b2b09969f775c7dd40f2f3a908b15fe48b0874c729a09ea1d856229516ad9561 |
Close
Hashes for apytypes-0.2.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7980eca4e89cca4bbe68905783c7a0217521f9bcdde81749e0cabc01b39d4df4 |
|
MD5 | 69fa2a2a307e84c67b7abb397a3a85a1 |
|
BLAKE2b-256 | b668fc3ec91e9a21e6d734fc9e15789987246b1eaef91d112b128bd1c3ff8fe1 |
Close
Hashes for apytypes-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 269c944069031ee988883df17f388478faf636ead7e7b3445e445daacad85311 |
|
MD5 | 4f47a148c8e81af78195f74f3df844bb |
|
BLAKE2b-256 | c66bfd8b121489ee37d070f34e18096fd8798d9745c58ec27f3854364aca672c |
Close
Hashes for apytypes-0.2.1-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc9c9615791d35a58aecb77c4d383df9eb7f964aea480acce5a4354afdc35e2a |
|
MD5 | fc7fa5a735af04d3a940869f1ccdf2c5 |
|
BLAKE2b-256 | 703c4af4c8b11cb94bb5813fdce25ecc00e5a1537337ab905c6a8a2cb39db6ca |
Close
Hashes for apytypes-0.2.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fae9c418888704123b454ef61564290666a0b877d385f4121dc54144c6370889 |
|
MD5 | dacc09bbb920f8d2c2dfa8bab750450b |
|
BLAKE2b-256 | b77eb2a86ed72ccb22c1823fbcb93de17577acbed68ebf0127ff6c897b6b5480 |
Close
Hashes for apytypes-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef55e5d5e40dd16c70b9624ed49a620016fe6fb210fea63429c536def3812a9 |
|
MD5 | e1b65150472b5aa4067134b7a9965df0 |
|
BLAKE2b-256 | b766476d56163729038a75e8fb0dc9a0166cdda6dc3d051862470f7b8c419152 |
Close
Hashes for apytypes-0.2.1-cp311-cp311-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cef0efba44caae3aee7504cfab74a87588eae916fb14d5c3e8fce6ac2341719d |
|
MD5 | 95d6d09a728db891fb2433bb012a6cdf |
|
BLAKE2b-256 | 89da0195856370fd42f17d2fb754d86539555bb1d54bb788d2d793a4cc987dc7 |
Close
Hashes for apytypes-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8953da79c6d164de1821613282556c10bc0959e8ce69aea83ebad94114a2812 |
|
MD5 | bac90ef943738fff168261f46e78a398 |
|
BLAKE2b-256 | 8f9377d6e6841faf8900d24713c667deb452ba310f902f6a22b787c3f38cbd08 |
Close
Hashes for apytypes-0.2.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55142d368a05f15c9b1011917e4292fce989f96af320d10292521f3d73ecc116 |
|
MD5 | 07e2e6043a5cfa30aa3bd4b6e042e176 |
|
BLAKE2b-256 | 150a8c253f20b8e24adeac7218b73f5b9cca2d53223dde5c0a791e1f5ae6400b |
Close
Hashes for apytypes-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3297979e25d7a18e649967c439b8891916f02a9abbd7a3bf1473e75703dbee44 |
|
MD5 | 6c630d29c1411b073ad8035f211c165d |
|
BLAKE2b-256 | 2ae0d1623b2906272f2a42bd90ccfc50c7eead9d3a01f0eabe06586f77cc66a5 |
Close
Hashes for apytypes-0.2.1-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7914d2f2924a08c13a98366ef89c6c41afa10163d708bc951bd9ff6c022545be |
|
MD5 | 88f78e310895b9e171087d1667531ce5 |
|
BLAKE2b-256 | c62e0d99ab1563089b87f9ce7e9d3748f002c094dd2caeee0e96c176656d65a5 |
Close
Hashes for apytypes-0.2.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63b67273aaabd020f0e77626c677f102fc1b4a71368905b6d2ce6e022ba6a3dc |
|
MD5 | b284896f65259fcb24cc324a0e29a131 |
|
BLAKE2b-256 | 5f6d1e43bc0196be12025d038126c80277fdfba0f5069658a6ccf486f76e8a31 |
Close
Hashes for apytypes-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce945869274c6eb89b59059ecd80e310bbf642ba03042127240fcc0cdd493e96 |
|
MD5 | eedc5ce540d4dc879ce938199256987b |
|
BLAKE2b-256 | 20edf9916bff1c99f40f700a9843c99a3218b2365dddd5176b9b1cc4ae6e000d |
Close
Hashes for apytypes-0.2.1-cp310-cp310-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e855b970aedc6afc47c52e5004b1a493604f847a3b44ae7793980e883f7eb48 |
|
MD5 | b75355e022e64c1efba4dd4879860d5d |
|
BLAKE2b-256 | 2757b68df14d5745259966605152d9673cdc550ff5fad9d0036e33c47c3b5550 |
Close
Hashes for apytypes-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86fcd794408ecfd378ee994e9ad5152c98df74db5eff5cc5b6967b5b3ef44d5c |
|
MD5 | 55ff10ac3bfb000cf89754484d998f7d |
|
BLAKE2b-256 | 96d65ce0d2f6005c4366686c6634b13fa6edbc472aa023fb4004ed0694d1c8ec |
Close
Hashes for apytypes-0.2.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e6ef7983b4ec5ce5e71e19945e08d014ae8935f5eb0037c81acde167f0492ea |
|
MD5 | bc763f54b06e25735b3f2a34f7be669e |
|
BLAKE2b-256 | e78cfa29c4f81611ee5c1c956e4f49ba9dccc326107c80737a885879c1b1b8cb |
Close
Hashes for apytypes-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6cf3905face2e4046e5cb2d0907da3fdcfa599102617717bd5ddb213b401eb6 |
|
MD5 | 0e03efab99a6b01193f9b4cc1f6daac5 |
|
BLAKE2b-256 | 35edfb765ab4079aa49f6d00dce0643763340693f7f5c31a7358de843e03a0f3 |
Close
Hashes for apytypes-0.2.1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6d66e13d2caf33717ab511ed149fe837b99489ef70b31c639dde3f5eca8b428 |
|
MD5 | cf831ba370d91d47893b0629fd865d06 |
|
BLAKE2b-256 | 0d07b9d915ea7bffb2d2ad25a0435f667d5e31bc63a2685f6bc346e3da3048ac |
Close
Hashes for apytypes-0.2.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b2b7c8953483575b24fc5b5183140492b0aee2334df0668c63c22996d5243d9 |
|
MD5 | ec49334fd76dafd0ab0f923fb1f2663b |
|
BLAKE2b-256 | 36a457929e1f0b5858955713e8fb58caefb1b6d1dda52f42dadc14606af46e27 |
Close
Hashes for apytypes-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dffea0531f339d0873e2db717c9f175b9cb3e246530ec4cc87b450605b41401d |
|
MD5 | e83e9b33dc5fe3b1e3195448bb5c32da |
|
BLAKE2b-256 | 4614884f37075115a75e8a771cf2df388ef4d23d06b765ec3b7375860b294efc |
Close
Hashes for apytypes-0.2.1-cp39-cp39-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 695acf5514bfe4269f9f9124e73b7d3528dd36b9a5d9bd9431224611daef6365 |
|
MD5 | 52a7a0176f04c04db1429700a8516e63 |
|
BLAKE2b-256 | 2c870c7c889e786a026960d58e316ca9ad78ea7add021ffccfbec3132ebf3b6b |
Close
Hashes for apytypes-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 755fc6ac5d4b5c4f0e1c704c03971456c52613b084a672b67604fdfff32db179 |
|
MD5 | 7a02cee6abe3cad5640ed12f0f0ecb25 |
|
BLAKE2b-256 | 6c17d1aff25c70f230c3e321d332463edca019f0cccf27e829236f8fbc63215e |
Close
Hashes for apytypes-0.2.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3f2d30b00480a21fed556a315f1ab0e0ad57c3c217e8798b78587567845226f |
|
MD5 | c29a8f5a36b81cef489bafb6c0dca4aa |
|
BLAKE2b-256 | 9d66f34a485507ccdc0dd64026b77450074b4a1f842c32e85897a2ab17896dbb |
Close
Hashes for apytypes-0.2.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb9321b81bcce8e4c4028916ddf3fc49d04a17da561e5cf7977a925cae7ddc9f |
|
MD5 | 067fd4c0d854158fcfe658f95065b174 |
|
BLAKE2b-256 | 5008426dc65d8e33a97b3e1c12a5c2037d5b6e90bbda577c94fc24d44a214fc4 |
Close
Hashes for apytypes-0.2.1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab325c5b254db48ce20779d785f9ee96cb633136571ca2ab6753b8a3c903f548 |
|
MD5 | ddad31938a58418cb3a3da802b970ae4 |
|
BLAKE2b-256 | 0aafeddff66a57b9cfd6d4291f417bb80b6d2bf403d0020b76d57ca432771399 |