Module for finding sequences in arrays using Cython and NumPy.
pip install cythonsequencefinder
Tested against Windows / Python 3.11 / Anaconda
Cython (and a C/C++ compiler) must be installed to use the optimized Cython implementation.
from time import perf_counter
import numpy as np
from cythonsequencefinder import np_search_sequence
from cythonsequencefinder import find_seq
seq = np.array([1, 2, 4, 5], dtype=np.int32)
sequence_size = len(seq)
arr = np.random.randint(low=0, high=10, size=1000000, dtype=np.int32)
start = perf_counter()
rax = find_seq(arr, seq, distance=1)
print(perf_counter() - start)
start = perf_counter()
rax2 = np_search_sequence(arr, seq, distance=1)
print(perf_counter() - start)
# 0.004291800003557 - cython
# 0.007874400005675852 - numpy
Metadata
Release files for cythonsequencefinder 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cythonsequencefinder-0.10.tar.gz | 21.4 kB | Without provenance | Details for cythonsequencefinder-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cythonsequencefinder-0.10-py3-none-any.whl | Python 3 | none | any | Details for cythonsequencefinder-0.10-py3-none-any.whl |
Total release size: 43.2 kB
Release files / cythonsequencefinder-0.10.tar.gz
| Download URL | cythonsequencefinder-0.10.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20c22bda56db2a38009194d5f7cfb65ff354f441c7ef9da2bb1dca250fd43da8
|
|
BLAKE2b-256 checksum How to use checksums |
70dacb7c548470670c930ada65ef93914242e1ccfa54415d19f68ccbd08bccd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / cythonsequencefinder-0.10-py3-none-any.whl
| Download URL | cythonsequencefinder-0.10-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b65404d66417cb27de9ffea667c7cb7153dc7d0eeb695f8dc47835fde8c591f5
|
|
BLAKE2b-256 checksum How to use checksums |
e31ce19b0cc93b7dc1beff61f382f065de273381089211b897c7557f03f4f997
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for cythonsequencefinder 0.10
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.