From xarray to xframe¶
Containers¶
Python 3 - xarray |
C++ 14 - xframe |
---|---|
xr.DataArray([[1, 2], [3, 4]], [('x', ['a', 'b']), ('y', [1, 4])]) |
xf::variable<double>({{1, 2}, {3, 4}}, {{"x", xf::axis({"a", "b"})}, {"y", xf::axis({1, 4})}}) |
Indexing¶
xframe returns views for multi-selection, no copy is made.
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Logical¶
Logical universal functions are truly lazy. xf::where(condition, a, b)
does not evaluate a
where condition
is falsy, and it does not evaluate b
where condition
is truthy.
xarray relies on numpy functions, that can also operate on xarray.DataArray
.
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Comparisons¶
xarray relies on numpy functions, that can also operate on xarray.DataArray
.
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
xf::less(a, b) a < b |
|
xf::less_equal(a, b) a <= b |
|
xf::greater(a, b) a > b |
|
xf::greater_equal(a, b) a >= b |
Mathematical functions¶
xframe universal functions are provided for a large set number of mathematical functions.
xarray relies on numpy functions, that can also operate on xarray.DataArray
.
Basic functions:
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|
|
|
|
Exponential functions:
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|
|
|
Power functions:
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|
|
|
Trigonometric functions:
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|
Hyperbolic functions:
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|
Error and gamma functions:
Python 3 - xarray |
C++ 14 - xframe |
---|---|
|
|
|
|
|
|