xarray


Namexarray JSON
Version 2022.12.0 PyPI version JSON
download
home_pagehttps://github.com/pydata/xarray
SummaryN-D labeled arrays and datasets in Python
upload_time2022-12-02 23:44:55
maintainer
docs_urlNone
authorxarray Developers
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements numpy packaging pandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
**xarray** (formerly **xray**) is an open source project and Python package
that makes working with labelled multi-dimensional arrays simple,
efficient, and fun!

xarray introduces labels in the form of dimensions, coordinates and
attributes on top of raw NumPy_-like arrays, which allows for a more
intuitive, more concise, and less error-prone developer experience.
The package includes a large and growing library of domain-agnostic functions
for advanced analytics and visualization with these data structures.

xarray was inspired by and borrows heavily from pandas_, the popular data
analysis package focused on labelled tabular data.
It is particularly tailored to working with netCDF_ files, which were the
source of xarray's data model, and integrates tightly with dask_ for parallel
computing.

.. _NumPy: https://www.numpy.org
.. _pandas: https://pandas.pydata.org
.. _dask: https://dask.org
.. _netCDF: https://www.unidata.ucar.edu/software/netcdf

Why xarray?
-----------
Multi-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called
"tensors") are an essential part of computational science.
They are encountered in a wide range of fields, including physics, astronomy,
geoscience, bioinformatics, engineering, finance, and deep learning.
In Python, NumPy_ provides the fundamental data structure and API for
working with raw ND arrays.
However, real-world datasets are usually more than just raw numbers;
they have labels which encode information about how the array values map
to locations in space, time, etc.

xarray doesn't just keep track of labels on arrays -- it uses them to provide a
powerful and concise interface. For example:

-  Apply operations over dimensions by name: ``x.sum('time')``.
-  Select values by label instead of integer location: ``x.loc['2014-01-01']`` or ``x.sel(time='2014-01-01')``.
-  Mathematical operations (e.g., ``x - y``) vectorize across multiple dimensions (array broadcasting) based on dimension names, not shape.
-  Flexible split-apply-combine operations with groupby: ``x.groupby('time.dayofyear').mean()``.
-  Database like alignment based on coordinate labels that smoothly handles missing values: ``x, y = xr.align(x, y, join='outer')``.
-  Keep track of arbitrary metadata in the form of a Python dictionary: ``x.attrs``.

Learn more
----------
- Documentation: `<https://docs.xarray.dev>`_
- Issue tracker: `<https://github.com/pydata/xarray/issues>`_
- Source code: `<https://github.com/pydata/xarray>`_
- SciPy2015 talk: `<https://www.youtube.com/watch?v=X0pAhJgySxk>`_

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pydata/xarray",
    "name": "xarray",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "xarray Developers",
    "author_email": "xarray@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/f8/5c/4e160293ad96d5db5c140393eb8f5a529aa63cc6bc26ec9760bf8de4c326/xarray-2022.12.0.tar.gz",
    "platform": null,
    "description": "\n**xarray** (formerly **xray**) is an open source project and Python package\nthat makes working with labelled multi-dimensional arrays simple,\nefficient, and fun!\n\nxarray introduces labels in the form of dimensions, coordinates and\nattributes on top of raw NumPy_-like arrays, which allows for a more\nintuitive, more concise, and less error-prone developer experience.\nThe package includes a large and growing library of domain-agnostic functions\nfor advanced analytics and visualization with these data structures.\n\nxarray was inspired by and borrows heavily from pandas_, the popular data\nanalysis package focused on labelled tabular data.\nIt is particularly tailored to working with netCDF_ files, which were the\nsource of xarray's data model, and integrates tightly with dask_ for parallel\ncomputing.\n\n.. _NumPy: https://www.numpy.org\n.. _pandas: https://pandas.pydata.org\n.. _dask: https://dask.org\n.. _netCDF: https://www.unidata.ucar.edu/software/netcdf\n\nWhy xarray?\n-----------\nMulti-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called\n\"tensors\") are an essential part of computational science.\nThey are encountered in a wide range of fields, including physics, astronomy,\ngeoscience, bioinformatics, engineering, finance, and deep learning.\nIn Python, NumPy_ provides the fundamental data structure and API for\nworking with raw ND arrays.\nHowever, real-world datasets are usually more than just raw numbers;\nthey have labels which encode information about how the array values map\nto locations in space, time, etc.\n\nxarray doesn't just keep track of labels on arrays -- it uses them to provide a\npowerful and concise interface. For example:\n\n-  Apply operations over dimensions by name: ``x.sum('time')``.\n-  Select values by label instead of integer location: ``x.loc['2014-01-01']`` or ``x.sel(time='2014-01-01')``.\n-  Mathematical operations (e.g., ``x - y``) vectorize across multiple dimensions (array broadcasting) based on dimension names, not shape.\n-  Flexible split-apply-combine operations with groupby: ``x.groupby('time.dayofyear').mean()``.\n-  Database like alignment based on coordinate labels that smoothly handles missing values: ``x, y = xr.align(x, y, join='outer')``.\n-  Keep track of arbitrary metadata in the form of a Python dictionary: ``x.attrs``.\n\nLearn more\n----------\n- Documentation: `<https://docs.xarray.dev>`_\n- Issue tracker: `<https://github.com/pydata/xarray/issues>`_\n- Source code: `<https://github.com/pydata/xarray>`_\n- SciPy2015 talk: `<https://www.youtube.com/watch?v=X0pAhJgySxk>`_\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "N-D labeled arrays and datasets in Python",
    "version": "2022.12.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b8ed666d7beadf3464ce2bbd42e9f7ed",
                "sha256": "eaf3e4c0b62faebf7965f272ce76bc2fc1c9d93c2b966a390e929ef082a796dd"
            },
            "downloads": -1,
            "filename": "xarray-2022.12.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b8ed666d7beadf3464ce2bbd42e9f7ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 969959,
            "upload_time": "2022-12-02T23:44:53",
            "upload_time_iso_8601": "2022-12-02T23:44:53.983302Z",
            "url": "https://files.pythonhosted.org/packages/0b/43/b61d430c6b4071a687ff29855ba2a3134d064dd6864d9db3075ad51e010e/xarray-2022.12.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "4a7e78f3a4d8dbe88d832609a7831028",
                "sha256": "083d08e552a7647c7ece136dfa3a4b6a1379256beb55bbed8b8ddf05f1e14ec7"
            },
            "downloads": -1,
            "filename": "xarray-2022.12.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4a7e78f3a4d8dbe88d832609a7831028",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3060755,
            "upload_time": "2022-12-02T23:44:55",
            "upload_time_iso_8601": "2022-12-02T23:44:55.945131Z",
            "url": "https://files.pythonhosted.org/packages/f8/5c/4e160293ad96d5db5c140393eb8f5a529aa63cc6bc26ec9760bf8de4c326/xarray-2022.12.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-02 23:44:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pydata",
    "github_project": "xarray",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.20"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    ">=",
                    "21.3"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "1.3"
                ]
            ]
        }
    ],
    "lcname": "xarray"
}
        
Elapsed time: 0.03325s