stridessequencefinder


Namestridessequencefinder JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/stridessequencefinder
Summaryfinds sequences [3, 4, 5] in NumPy arrays [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] - result: [2 7]
upload_time2023-09-11 20:09:36
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords numpy numexpr strides sequence
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# finds sequences [3, 4, 5] in NumPy arrays [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] - result: [2 7]

## Tested against Windows 10 / Python 3.10 / Anaconda

## pip install stridessequencefinder



```python

Find occurrences of a sequence in a 1-dimensional NumPy array using a rolling window approach.

Parameters:
sequence (numpy.ndarray): The sequence to search for.
array (numpy.ndarray): The input array to search within.
numexpr_enabled (bool, optional): Whether to use NumExpr for efficient computation (default is True).

Returns:
numpy.ndarray: An array of indices where the sequence is found in the input array.

Example:
>>> arr = np.array([1, 2, 3, 4, 5, 1, 2, 3, 4, 5])
>>> seq = np.array([3, 4, 5])
>>> indices = find_sequence_in_array(seq, arr)
>>> print(indices)
[2 7]

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/stridessequencefinder",
    "name": "stridessequencefinder",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "numpy,numexpr,strides,sequence",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9c/d2/834452ffb54ad22fea6a88a80d96abe7da396b1af8ace8421170d87cedce/stridessequencefinder-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# finds sequences [3, 4, 5] in NumPy arrays [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] - result: [2 7]\r\n\r\n## Tested against Windows 10 / Python 3.10 / Anaconda\r\n\r\n## pip install stridessequencefinder\r\n\r\n\r\n\r\n```python\r\n\r\nFind occurrences of a sequence in a 1-dimensional NumPy array using a rolling window approach.\r\n\r\nParameters:\r\nsequence (numpy.ndarray): The sequence to search for.\r\narray (numpy.ndarray): The input array to search within.\r\nnumexpr_enabled (bool, optional): Whether to use NumExpr for efficient computation (default is True).\r\n\r\nReturns:\r\nnumpy.ndarray: An array of indices where the sequence is found in the input array.\r\n\r\nExample:\r\n>>> arr = np.array([1, 2, 3, 4, 5, 1, 2, 3, 4, 5])\r\n>>> seq = np.array([3, 4, 5])\r\n>>> indices = find_sequence_in_array(seq, arr)\r\n>>> print(indices)\r\n[2 7]\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "finds sequences [3, 4, 5] in NumPy arrays [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] - result: [2 7]",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/stridessequencefinder"
    },
    "split_keywords": [
        "numpy",
        "numexpr",
        "strides",
        "sequence"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d0d3ca26a24a77d7313a004f61df18c7945d99c387076df20505e6b0e7d759d",
                "md5": "fc4707c82688b2d38d63ea36d2061281",
                "sha256": "8a665a1ab59d2ce60c9445d2c669db349403810f49af432d32c43d30517caaf3"
            },
            "downloads": -1,
            "filename": "stridessequencefinder-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fc4707c82688b2d38d63ea36d2061281",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 21088,
            "upload_time": "2023-09-11T20:09:34",
            "upload_time_iso_8601": "2023-09-11T20:09:34.277599Z",
            "url": "https://files.pythonhosted.org/packages/1d/0d/3ca26a24a77d7313a004f61df18c7945d99c387076df20505e6b0e7d759d/stridessequencefinder-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9cd2834452ffb54ad22fea6a88a80d96abe7da396b1af8ace8421170d87cedce",
                "md5": "f8d44b6f56ee3ca434f2c87e0ce8bc9d",
                "sha256": "5dfe04a982dd449b54b29cad45bb3282e7012c75e321b8b329e13959f6c67ff8"
            },
            "downloads": -1,
            "filename": "stridessequencefinder-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "f8d44b6f56ee3ca434f2c87e0ce8bc9d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 20259,
            "upload_time": "2023-09-11T20:09:36",
            "upload_time_iso_8601": "2023-09-11T20:09:36.376473Z",
            "url": "https://files.pythonhosted.org/packages/9c/d2/834452ffb54ad22fea6a88a80d96abe7da396b1af8ace8421170d87cedce/stridessequencefinder-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-11 20:09:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "stridessequencefinder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "stridessequencefinder"
}
        
Elapsed time: 0.14305s