@@ -9,49 +9,47 @@ xarray: N-D labeled arrays and datasets
9
9
:target: https://coveralls.io/r/pydata/xarray
10
10
.. image :: https://readthedocs.org/projects/xray/badge/?version=latest
11
11
:target: http://xarray.pydata.org/
12
- .. image :: https://img.shields.io/pypi/v/xarray.svg
13
- :target: https://pypi.python.org/pypi/xarray/
14
- .. image :: https://zenodo.org/badge/13221727.svg
15
- :target: https://zenodo.org/badge/latestdoi/13221727
16
12
.. image :: http://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat
17
13
:target: http://pandas.pydata.org/speed/xarray/
18
- .. image :: https://img.shields.io/badge/powered%20by-NumFOCUS-orange .svg?style=flat&colorA=E1523D&colorB=007D8A
19
- :target: http ://numfocus. org
14
+ .. image :: https://img.shields.io/pypi/v/xarray .svg
15
+ :target: https ://pypi.python. org/pypi/xarray/
20
16
21
17
**xarray ** (formerly **xray **) is an open source project and Python package
22
18
that makes working with labelled multi-dimensional arrays simple,
23
19
efficient, and fun!
24
20
25
- Multi-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called
26
- "tensors") are an essential part of computational science.
27
- They are encountered in a wide range of fields, including physics, astronomy,
28
- geoscience, bioinformatics, engineering, finance, and deep learning.
29
- In Python, NumPy _ provides the fundamental data structure and API for
30
- working with raw ND arrays.
31
- However, real-world datasets are usually more than just raw numbers;
32
- they have labels which encode information about how the array values map
33
- to locations in space, time, etc.
21
+ Xarray introduces labels in the form of dimensions, coordinates and
22
+ attributes on top of raw NumPy _-like arrays, which allows for a more
23
+ intuitive, more concise, and less error-prone developer experience.
24
+ The package includes a large and growing library of domain-agnostic functions
25
+ for advanced analytics and visualization with these data structures.
34
26
35
- By introducing *dimensions *, *coordinates *, and *attributes * on top of raw
36
- NumPy-like arrays, xarray is able to understand these labels and use them to
37
- provide a more intuitive, more concise, and less error-prone experience.
38
- Xarray also provides a large and growing library of functions for advanced
39
- analytics and visualization with these data structures.
40
27
Xarray was inspired by and borrows heavily from pandas _, the popular data
41
28
analysis package focused on labelled tabular data.
42
- Xarray can read and write data from most common labeled ND-array storage
43
- formats and is particularly tailored to working with netCDF _ files, which were
44
- the source of xarray's data model .
29
+ It is particularly tailored to working with netCDF _ files, which were the
30
+ source of xarray's data model, and integrates tightly with dask _ for parallel
31
+ computing .
45
32
46
- .. _NumPy : http://www.numpy.org/
33
+ .. _NumPy : http://www.numpy.org
47
34
.. _pandas : http://pandas.pydata.org
35
+ .. _dask : http://dask.org
48
36
.. _netCDF : http://www.unidata.ucar.edu/software/netcdf
49
37
50
38
Why xarray?
51
39
-----------
52
40
53
- Adding dimensions names and coordinate indexes to numpy's ndarray _ makes many
54
- powerful array operations possible:
41
+ Multi-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called
42
+ "tensors") are an essential part of computational science.
43
+ They are encountered in a wide range of fields, including physics, astronomy,
44
+ geoscience, bioinformatics, engineering, finance, and deep learning.
45
+ In Python, NumPy _ provides the fundamental data structure and API for
46
+ working with raw ND arrays.
47
+ However, real-world datasets are usually more than just raw numbers;
48
+ they have labels which encode information about how the array values map
49
+ to locations in space, time, etc.
50
+
51
+ Xarray doesn't just keep track of labels on arrays -- it uses them to provide a
52
+ powerful and concise interface. For example:
55
53
56
54
- Apply operations over dimensions by name: ``x.sum('time') ``.
57
55
- Select values by label instead of integer location:
@@ -65,42 +63,10 @@ powerful array operations possible:
65
63
- Keep track of arbitrary metadata in the form of a Python dictionary:
66
64
``x.attrs ``.
67
65
68
- pandas _ provides many of these features, but it does not make use of dimension
69
- names, and its core data structures are fixed dimensional arrays.
70
-
71
- Why isn't pandas enough?
72
- ------------------------
73
-
74
- pandas _ excels at working with tabular data. That suffices for many statistical
75
- analyses, but physical scientists rely on N-dimensional arrays -- which is
76
- where xarray comes in.
77
-
78
- xarray aims to provide a data analysis toolkit as powerful as pandas _ but
79
- designed for working with homogeneous N-dimensional arrays
80
- instead of tabular data. When possible, we copy the pandas API and rely on
81
- pandas's highly optimized internals (in particular, for fast indexing).
82
-
83
- Why netCDF?
84
- -----------
85
-
86
- Because xarray implements the same data model as the netCDF _ file format,
87
- xarray datasets have a natural and portable serialization format. But it is also
88
- easy to robustly convert an xarray ``DataArray `` to and from a numpy ``ndarray ``
89
- or a pandas ``DataFrame `` or ``Series ``, providing compatibility with the full
90
- `PyData ecosystem <http://pydata.org/ >`__.
91
-
92
- Our target audience is anyone who needs N-dimensional labeled arrays, but we
93
- are particularly focused on the data analysis needs of physical scientists --
94
- especially geoscientists who already know and love netCDF _.
95
-
96
- .. _ndarray : http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html
97
- .. _pandas : http://pandas.pydata.org
98
- .. _netCDF : http://www.unidata.ucar.edu/software/netcdf
99
-
100
66
Documentation
101
67
-------------
102
68
103
- The official documentation is hosted on ReadTheDocs at http://xarray.pydata.org/
69
+ Learn more about xarray in its official documentation at http://xarray.pydata.org/
104
70
105
71
Contributing
106
72
------------
0 commit comments