Skip to main content

Converts a numpy string array with hex values to int

# Tested with:
# Python 3.9.13
# Windows 10

pip install hexarray2decimal

from hexarray2decimal import numpy_hex_string_array_to_int

a1 = 20000 * ["0xffff", "0xa011", "0xb122", "0x99ff", "0x00ee", "0x0b54"]
a1r = numpy_hex_string_array_to_int(numpyarray=a1)
print(a1r)
# [65535 40977 45346 ... 39423   238  2900]


a1 = 20000 * ["0xff", "0xa0", "0xb1", "0x99", "0x00", "0x0b"]
a1r = numpy_hex_string_array_to_int(numpyarray=a1)
print(a1r)
# [255 160 177 ... 153   0  11]

a1 = 20000 * ["ff", "a0", "b1", "99", "00", "0b"]
a1r = numpy_hex_string_array_to_int(numpyarray=a1)
print(a1r)
# [255 160 177 ... 153   0  11]
a1 = 20000 * ["f", "a", "b", "9", "0", "c"]
a1r = numpy_hex_string_array_to_int(numpyarray=a1)
print(a1r)
# [15 10 11 ...  9  0 12]
a1 = 20000 * ["0xFF", "0xA1", "0xB2", "0x99", "0xE0", "0xCB"]
a1r = numpy_hex_string_array_to_int(numpyarray=a1)
print(a1r)
# [255 161 178 ... 153 224 203]


# Different string sizes may lead to unexpected behavior:
a1 = 20000 * ["fffff", "a", "b", "9", "0", "c"]
a1r = numpy_hex_string_array_to_int(numpyarray=a1)
print(a1r)
# [1048575  655360  720896 ...  589824       0  786432]

Metadata

Release files for hexarray2decimal 0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hexarray2decimal 0.12
File Size Uploaded Provenance Actions
hexarray2decimal-0.12.tar.gz 4.2 kB Without provenance Details for hexarray2decimal-0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hexarray2decimal 0.12
File Interpreter ABI Platform Actions
hexarray2decimal-0.12-py3-none-any.whl Python 3 none any Details for hexarray2decimal-0.12-py3-none-any.whl

Total release size: 9.8 kB

Release files / hexarray2decimal-0.12.tar.gz

Download URL hexarray2decimal-0.12.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0f779ddcef73d48170bc47c3300f14aaacfa3ea9d55e92cf931496fe64721d18
BLAKE2b-256 checksum
How to use checksums
8e84a32e52ba3638ca5008d16363d577561799aab005d8a401db52fa9bbdd6a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / hexarray2decimal-0.12-py3-none-any.whl

Download URL hexarray2decimal-0.12-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa6d951621501206bca236bcb1f5b021af9c32136479d10c4bca02176d7c6393
BLAKE2b-256 checksum
How to use checksums
06d03fe330da9aebf777f22da297acd59a3521e029262a519c08de0835e6bd5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for hexarray2decimal 0.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.12 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page