intnan


Nameintnan JSON
Version 0.2.1 PyPI version JSON
download
home_page
SummaryFunction collection for handling integers with NaNs.
upload_time2023-09-22 16:36:35
maintainer
docs_urlNone
author
requires_python>=3.9
licenseBSD 2-Clause License Copyright (c) 2022, Michael All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords integer nan missing values intnan
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![GitHub Workflow CI Status](https://img.shields.io/github/actions/workflow/status/ml31415/intnan/python-package.yml?branch=master&logo=github&style=flat)](https://github.com/ml31415/intnan/actions)
[![Supported Versions](https://img.shields.io/pypi/pyversions/intnan.svg)](https://pypi.org/project/intnan)
[![PyPI](https://img.shields.io/pypi/v/intnan.svg?style=flat)](https://pypi.org/project/intnan/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# intnan

Integer data types lack special values for `-inf`, `inf` and `NaN`. Especially
`NaN` as an indication for missing data would be useful in many scientific contexts.

Of course there is `numpy.ma.MaskedArray` around for the very same reason. Nevertheless,
it might sometimes be annoying to carry a separate mask array around. And in those cases,
using a set of `numpy`-compatible functions for the same job will do just fine.

This package provides such an implementation for several standard `numpy` functions, that 
treat integer arrays in such a way, that the lowest negative integer resembles `NaN`.

The library provides an implementation using only standard `numpy` functions and
another implementation using `numba`, for functions that allow major speed gains. 
The `numba` implementation is automatically selected, when it is available for import.

## functions

The following list of functions is provided by `intnan`.

- nanval(x)
- isnan(x)
- fix_invalid(x, copy=True, fill_value=0)
- asfloat(x)
- anynan(x)
- allnan(x)
- nanmax(x)
- nanmin(x)
- nanmaximum(x, y)
- nanminimum(x, y)
- nansum(x)
- nanprod(x)
- nancumsum(x)
- nanmean(x)
- nanvar(x, ddof=0)
- nanstd(x, ddof=0)
- nanequal(x, y)
- nanclose(x, y, delta=sys.float_info.epsilon)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "intnan",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "integer,nan,missing values,intnan",
    "author": "",
    "author_email": "Michael L\u00f6ffler <ml@occam.com.ua>",
    "download_url": "https://files.pythonhosted.org/packages/34/54/9e31ef0f73224d07647f3a3704ca6a56492757ce66cff046a3631084723e/intnan-0.2.1.tar.gz",
    "platform": null,
    "description": "[![GitHub Workflow CI Status](https://img.shields.io/github/actions/workflow/status/ml31415/intnan/python-package.yml?branch=master&logo=github&style=flat)](https://github.com/ml31415/intnan/actions)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/intnan.svg)](https://pypi.org/project/intnan)\n[![PyPI](https://img.shields.io/pypi/v/intnan.svg?style=flat)](https://pypi.org/project/intnan/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n# intnan\n\nInteger data types lack special values for `-inf`, `inf` and `NaN`. Especially\n`NaN` as an indication for missing data would be useful in many scientific contexts.\n\nOf course there is `numpy.ma.MaskedArray` around for the very same reason. Nevertheless,\nit might sometimes be annoying to carry a separate mask array around. And in those cases,\nusing a set of `numpy`-compatible functions for the same job will do just fine.\n\nThis package provides such an implementation for several standard `numpy` functions, that \ntreat integer arrays in such a way, that the lowest negative integer resembles `NaN`.\n\nThe library provides an implementation using only standard `numpy` functions and\nanother implementation using `numba`, for functions that allow major speed gains. \nThe `numba` implementation is automatically selected, when it is available for import.\n\n## functions\n\nThe following list of functions is provided by `intnan`.\n\n- nanval(x)\n- isnan(x)\n- fix_invalid(x, copy=True, fill_value=0)\n- asfloat(x)\n- anynan(x)\n- allnan(x)\n- nanmax(x)\n- nanmin(x)\n- nanmaximum(x, y)\n- nanminimum(x, y)\n- nansum(x)\n- nanprod(x)\n- nancumsum(x)\n- nanmean(x)\n- nanvar(x, ddof=0)\n- nanstd(x, ddof=0)\n- nanequal(x, y)\n- nanclose(x, y, delta=sys.float_info.epsilon)\n",
    "bugtrack_url": null,
    "license": "BSD 2-Clause License  Copyright (c) 2022, Michael All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Function collection for handling integers with NaNs.",
    "version": "0.2.1",
    "project_urls": {
        "source": "https://github.com/ml31415/intnan",
        "tracker": "https://github.com/ml31415/intnan/issues"
    },
    "split_keywords": [
        "integer",
        "nan",
        "missing values",
        "intnan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a33007f4668568d300fe5d9e0230879d8268af4a627462d773b81d6d8b059c8a",
                "md5": "07a780db6ae903e1cae852bbd455edb6",
                "sha256": "0e96e304c79f05cc0e6e848a77cd2fadc9e4b86aed9d286c621458752079966f"
            },
            "downloads": -1,
            "filename": "intnan-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "07a780db6ae903e1cae852bbd455edb6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9682,
            "upload_time": "2023-09-22T16:36:33",
            "upload_time_iso_8601": "2023-09-22T16:36:33.646919Z",
            "url": "https://files.pythonhosted.org/packages/a3/30/07f4668568d300fe5d9e0230879d8268af4a627462d773b81d6d8b059c8a/intnan-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "34549e31ef0f73224d07647f3a3704ca6a56492757ce66cff046a3631084723e",
                "md5": "9a86d56a8be0b22b96b92bb5e5f43153",
                "sha256": "47a49b1aaf47925fec01e2a44efde3c8c85ddbb44e57d119b8b24b47f2bf87b7"
            },
            "downloads": -1,
            "filename": "intnan-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9a86d56a8be0b22b96b92bb5e5f43153",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11517,
            "upload_time": "2023-09-22T16:36:35",
            "upload_time_iso_8601": "2023-09-22T16:36:35.074388Z",
            "url": "https://files.pythonhosted.org/packages/34/54/9e31ef0f73224d07647f3a3704ca6a56492757ce66cff046a3631084723e/intnan-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-22 16:36:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ml31415",
    "github_project": "intnan",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "intnan"
}
        
Elapsed time: 0.11344s