Convert various unusual data types into integers and floats
Project description
type-converter
Convert various unsigned integers to non-native Python or Numpy types.
function types
For each conversion, there are two kinds of functions to import:
- typeconvert.func: scalar functions
- typeconvert.ufunc: numpy universal functions (ufunc)
Choose what kind of function to import:
from typeconvert.func import <function_name_here>
from typeconvert.ufunc import <function_name_here>
scalar functions
The scalar functions take unsigned Python int
as inputs and return either an int
or Pytho float
as appropriate.
numpy universal functions
The numpy universal functions take the minimum-sized np.uint<> for the given type, and return the minimum-sized np.uint<> or np.float<> for the dynamic range of the output.
examples
Two's-Complement
In [1]: from typeconvert.func import twoscomp
In [2]: twoscomp(0x00, 8), twoscomp(0xFF, 8), twoscomp(0x7F, 8), twoscomp(0x80, 8)
Out[2]: (0, -1, 127, -128)
MIL-STD-1750A32
In [3]: from typeconvert.func import milstd1750a32
In [4]: milstd1750a32(0x40000000), milstd1750a32(0x80000000), milstd1750a32(0x9FFFFF04)
Out[4]: (0.5, -1.0, -12.000002)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
typeconvert-0.2.0.tar.gz
(5.1 MB
view hashes)
Built Distributions
Close
Hashes for typeconvert-0.2.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fa1b9fcad91cdefdc3d30cd0ddf19dfa4369a14b271e820051f1e11e7ef043b |
|
MD5 | 2e5d2b4d7e24fa0161772072ffd6c906 |
|
BLAKE2b-256 | 5e10762064acbbf5c11de5eb94c079a824b6e8f8fe924c3cf852eadade2591af |
Close
Hashes for typeconvert-0.2.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e872322a6cbdb271bb8533196a48464bb81b82a1dc3cf2a4716d2a66ce215e3e |
|
MD5 | 5d78b327be66237b737d790a15ef2b42 |
|
BLAKE2b-256 | 7607eb58b241a42579babe520c8daef6ef0d349dc242eb7ff3e01a4e74d4266b |
Close
Hashes for typeconvert-0.2.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5599b2eb2e4c00d2edba7bc580eba80e08f2109275f1663e1e6e3cdaef8019c3 |
|
MD5 | 89f1cfd7c5043379c5780353a8ca6331 |
|
BLAKE2b-256 | c1505c5562942479202f85c8d27da5d1fc51b3d28ce752c0a9df228f69c5e4af |
Close
Hashes for typeconvert-0.2.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58573b2357f27c16f164d5471fe32d444cea50c7fe87bcc76c14e6db688f04b9 |
|
MD5 | e6e65abd0638177b838bc1a86eb7ea52 |
|
BLAKE2b-256 | ad1d3ebfecdf582ed0e32193c9c28ccb4645ca7e106a520351501ee314e4bf94 |
Close
Hashes for typeconvert-0.2.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d80fd7c0454bcdbcf88cb44e028e630f31208481452091773bfec9a7f5ba470 |
|
MD5 | d8585310b848c21629fb53651ba1912a |
|
BLAKE2b-256 | 3c2a9c53e9b0ac35c4c29ed35c617e0a0cb777fc36e84032bb31a1d297304a4d |
Close
Hashes for typeconvert-0.2.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acba4ee5959ad06f7c84eefda49ef1686cd648c73d4cccff159d3ae50f299921 |
|
MD5 | baeab0e0855313f1364f47ca6ec23b12 |
|
BLAKE2b-256 | 3ee27bb50fd7145d3d4619338a23f5dbabb214d2cedea7ef187978d14dc55df3 |
Close
Hashes for typeconvert-0.2.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8a008b5c60a85cef18d81aa064faab3c3652d2d9aea66f86edeb918e721773b |
|
MD5 | 76bf91ccb3d5b482f9f6a1bc19787254 |
|
BLAKE2b-256 | e9d738dc321909cd71f5f0a587c6baec331046b4cb1f597aa145bc05ae74157b |
Close
Hashes for typeconvert-0.2.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3665dfdc4912cdc8b9ccf28857b8e5eb1fc331a562f906d1dd68157f20b18382 |
|
MD5 | 308c991ee54e96b129af2a1ca815379c |
|
BLAKE2b-256 | 418804efc9241f664279278c3366d5d8c0283d0510b6ac4d285b894039804ed6 |
Close
Hashes for typeconvert-0.2.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f64e924e432dc9d311dc4c59729c281614a4f5edcb33f5eb82d1021b3d657d2 |
|
MD5 | 131da76fe843f24e4be87417d6bba60c |
|
BLAKE2b-256 | 47303c518ddf90f9a949a6a5da38c317015d0242baa3bf1668968fcacaa1be8e |
Close
Hashes for typeconvert-0.2.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7a53def6f8c706ce1304f364b8d597be4d717eb123ea0681637817c0f946344 |
|
MD5 | dc82e29df5d5c0f2dbc367503208ffdd |
|
BLAKE2b-256 | 7042bdd38923b42c735d46d4c4c35f92d268d90ac2b30317d830a8832cdf8696 |
Close
Hashes for typeconvert-0.2.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fbadfb2d13e5f7c258723bd50bfde0b20996368e811eda8a25cba75e550257c |
|
MD5 | b96fba3680325776c56185516169b6d8 |
|
BLAKE2b-256 | b77582a18e010305baab54d142c80ae06dd66e6fc04d848d1633ba5cacadb1de |
Close
Hashes for typeconvert-0.2.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08c57a78b019aa79575d423abe9e6701a828078e0b42dbd98048d364950fd1c7 |
|
MD5 | 798dc4a9a94d387866833b46374d2025 |
|
BLAKE2b-256 | d5bb7e43afe5aabbfa0bfe2309cd1277f4c637f288d5324bf2527cb461508724 |
Close
Hashes for typeconvert-0.2.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7619f8c87e71b6fdb505335406e3ef561f6e0881adafa5e9cd104bb4a1ec2bc5 |
|
MD5 | d1bbcee722dacc431dbf000465d66f07 |
|
BLAKE2b-256 | ce5fbd5a7209ae0d3d5c619719ddd37a4712ce1010df196ebc74ffff176cb9c9 |
Close
Hashes for typeconvert-0.2.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 731ce9a3f34040ae8aa9a6aca12c2d4305723cff918f247c941a631c0b97c106 |
|
MD5 | 27f40db8e9c85b449b4745fce37c2223 |
|
BLAKE2b-256 | 35ea974a2a84b96c079767d599c2c5a2c621c76e4a629e13f0d356fd8ecf57d3 |
Close
Hashes for typeconvert-0.2.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09321c09a10908b4cf63a542c2041bfcf808e47b11c940f3a780fb477173f26f |
|
MD5 | 429b418a4abe0a0b44d1f9503f88c0ef |
|
BLAKE2b-256 | 023e173e203ed3f87c78eed235885d38d4f7caf9ac00422d03e975355f2572fc |
Close
Hashes for typeconvert-0.2.0-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d906afe6721d3149066956c6aa4ddbf2769fe1c12797b9178cd992418afbc208 |
|
MD5 | 0e90a87a16d18f993a98c1096c87debe |
|
BLAKE2b-256 | d8b5b7dd61ccb881c878629f1d31abf1620b8dcc585f3fb55264dc10b8623866 |
Close
Hashes for typeconvert-0.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 875a9379867a9b11d826200264bef187f0635d7c9fba7e722e8cfa3f9b0ecbc4 |
|
MD5 | a1fceb62db8504a2352e7bc0cb330ca0 |
|
BLAKE2b-256 | bdf23a2643d32bbbf7b57351ced2adeb5af67cf5090bb14ba5c78531e40b3c43 |
Close
Hashes for typeconvert-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e7f841433ffc5793770436d6a95bee32da9fa240244322ac01359dbd752de68 |
|
MD5 | 34a592003160431ec72f320c5f76c930 |
|
BLAKE2b-256 | d3519b6f12be7b5898648ec8e1115f5586c5dabf948587df0c794ccd6c9e9502 |
Close
Hashes for typeconvert-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad8c74dd36319d633dad445498247e96bfee270b685eafaff176a48702583275 |
|
MD5 | e8c7d447c45af565520d62a24eda270c |
|
BLAKE2b-256 | 965a359bb464c9ebc5214ba2a0e78ffc6334d770664612d2cac12712af2136cf |
Close
Hashes for typeconvert-0.2.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93fc440dca92101cfcda1a056447aebcbe2d764af13eae2c239569217a60147e |
|
MD5 | 656f741715c815b415891b5ff222a01b |
|
BLAKE2b-256 | cf52e0b713fcbd5e4cd634074370e1ace39a7d05e52c0e199358b82b922748c2 |
Close
Hashes for typeconvert-0.2.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 612e71d118877a7286e1b5d841fecf8842b77510890987514dba44b25524f6d7 |
|
MD5 | 8ab0db1799963a3acb6694be25b0d796 |
|
BLAKE2b-256 | a3a759cf9dd1977ea7db53982f632daa12b4102c00b4f05dfb98207b88d77a35 |
Close
Hashes for typeconvert-0.2.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62888c3c85e87807f961d24455ea030b9eb5c572a129612f9bd5a98869c12413 |
|
MD5 | 4f116b60273a15990d9460bc2e1f94e9 |
|
BLAKE2b-256 | f7e66ed21e312a7b4a9cbe5bc332367c90e12e32f639bea71060032937b4fdc8 |
Close
Hashes for typeconvert-0.2.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1363098c434b384e46824b04136de1dfe90c6a56dc05957f9a23ace1ad1107f8 |
|
MD5 | 440e99df28ca2a12920ec293c58d76b5 |
|
BLAKE2b-256 | 11094db3cefe11d135432656bd2052f7bdd1152c32f6c14ded7316ffed004c3f |
Close
Hashes for typeconvert-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bbe9f9d83c1b3694abf87e28a4c4b18391e723bdd10d2c8166aa28acf1c6b7c |
|
MD5 | 3de5ecfa6e1312f0af162d0ae50d689a |
|
BLAKE2b-256 | 0e17f16dc094b5398673ff4584cee7bae21a85ed354c93bd5f92563a33a8ea9e |
Close
Hashes for typeconvert-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3f2d6131339aeeea6b8058596824a7e9fb396b9239f9706dcfdf3ef03b2e8fe |
|
MD5 | f4a7ba53fb183e6df8c7a3026ae72876 |
|
BLAKE2b-256 | d44f897d82d1db353b43764344f1f61a391ef8332cbb8fc65a68252b7b26e134 |
Close
Hashes for typeconvert-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0363aa86f1356540d01f62a75e0850b3d0ec9310e086974f210f4196a94dd1e9 |
|
MD5 | 12a43f95de655b274845d271dd03d0db |
|
BLAKE2b-256 | 7660f6074f95f4f2117b5f99f09915e2828163b5746ee43eb8955c33db2fb441 |
Close
Hashes for typeconvert-0.2.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5744c24f9ea177c829a9e902bce629aba39950433f6fb46e73b4c8511d05e7c |
|
MD5 | ab599785027cf4f4a780a89fd6f89242 |
|
BLAKE2b-256 | e7aafbf98d44b55626b05a23997255dba5ad915f68e2048369404921dbbfa9db |
Close
Hashes for typeconvert-0.2.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeba7f01d05ebb4eb635b6dc733fa1cca464b3d9b47b4f283390b6bda6cde2cb |
|
MD5 | e502e80b9587ae7ae09e90c056431321 |
|
BLAKE2b-256 | e8df22c9692226ce5c4e9d9a6ae62118cabdf54975608fcbc60ab7b360d84f58 |
Close
Hashes for typeconvert-0.2.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6d56a61cc836323f88fd2216f04ee1783ad425f9de0f029f153f9d9d4e884d3 |
|
MD5 | b5f7a8a55a635a1f1624a3b9bb94e505 |
|
BLAKE2b-256 | 5f2dd3eca06fa180b74e2c35e630b8b595bbd90b564048f9e844f72238bd4a7a |
Close
Hashes for typeconvert-0.2.0-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 148af344af7640e04a692ad83740bdbf9cae45bbe72b95b09808b45129dfd592 |
|
MD5 | 75be361258826aad3dfc5973b3ec3e17 |
|
BLAKE2b-256 | 7bda981172d8e473a12687fe8512c8772b9fa71a19fe1d3fd807f9574099c8d5 |
Close
Hashes for typeconvert-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3040a29deaa1676d87464b20462816d6c61f6834c7de881bc8a8c456ebc06db9 |
|
MD5 | 907b93969eeaa318ff9ebbcb003213ef |
|
BLAKE2b-256 | 89ff3fa4fd128de2865135704ccb4259afd614f95224ea3a9df7d23659b11a3f |
Close
Hashes for typeconvert-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64fc57eed19adde1cf6c4c3cee3a3645b31061e48f1abaee35cde28c9d1fcabc |
|
MD5 | b417759efc319c33ac3f8a7b38e87e30 |
|
BLAKE2b-256 | 30f502d84e1920dfb497d3cdfd6dec728431bfe48b22b938e1bceaaf3a74e0ee |
Close
Hashes for typeconvert-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fe91f133e2e792a1de795335cca8c02da6bd9e418768e77f5a7a6f0802e84e5 |
|
MD5 | 84246e4f759b2e3413c5b6d95205b636 |
|
BLAKE2b-256 | c53702d8638fa1ecce0a396f4190f46fcb2da8a79b0ee9cdada20ae36f72872f |
Close
Hashes for typeconvert-0.2.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 472b07a52c917ab6ab5f7f3c1d63470d6b6d274d33162523a0bc82a344fb7e4d |
|
MD5 | 912940f4605e26d48ea2a17bf98c2142 |
|
BLAKE2b-256 | 557a4ff12981687152d1b63666b3663eba7fe9067719c4ab3c2c854100352b4a |
Close
Hashes for typeconvert-0.2.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53a3716c73277c23c73e63f020c361757b238263400476e95187a2b645e6e8dd |
|
MD5 | 0b35e1073e7e7e7eb8969b0ec9ed85de |
|
BLAKE2b-256 | e47db0a687b5c1c96013eab281f88cbe46ed8b3265bfaa840f9f759d9c6471b6 |
Close
Hashes for typeconvert-0.2.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74e4120677d442a098307937845565d5d94e217c325666eef5604ec37fa92000 |
|
MD5 | afc555c065fd8150b86fd59298eefbe0 |
|
BLAKE2b-256 | 82d51e4e46c806a518fc12adb090b4086de68369e57bdfa5f171e72dd5eacfd5 |
Close
Hashes for typeconvert-0.2.0-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a756f046bdec487762597c5b077c16990e2df6371540f134115a48cca43105ae |
|
MD5 | c2fdc8f71717b4fb0cfc48bd2cf118ef |
|
BLAKE2b-256 | a610b803f52704a040bf148c278ff43d00603eac1dac4981c4ab7f41890cc2c2 |
Close
Hashes for typeconvert-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23c64e698ee474c289cbbc8168a0611b420ddd37de792b7e69710fe4f77d8d01 |
|
MD5 | 9aa770a08a3ea168b1e38bfc90b059b9 |
|
BLAKE2b-256 | 38ab55cdeb7ad1c63506345800cf6c5ce02862b9f579b9704589e11dd2b89fa4 |
Close
Hashes for typeconvert-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a084ad6626f251e51c16f92c3c934ea08945d544fe6f7041736471448cd3fba9 |
|
MD5 | 3e9c23f09522b1d1f69cb370549e76c1 |
|
BLAKE2b-256 | 93619eaf9778f34b2414a985fcad0e58a3a42c02534b2a18032512f215e9a256 |
Close
Hashes for typeconvert-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eae87c167565cb544a3460de199df0b30a9757c993d54376b286922d9ad3e0f |
|
MD5 | af5ac2a7f0e63a9aca68873870dcdb49 |
|
BLAKE2b-256 | 802c397d4f0f8946b337c27c76d3951f823a711aaeb7d25236aebb56b5b99dc2 |