Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 599 Bytes

comparison_tables.md

File metadata and controls

18 lines (14 loc) · 599 Bytes

Reference for xarray

Comparison table

function xarray on python xarray on MATLAB
(This package)
Create DataArray(data) DataArray(data)
Lookup (see below) (see below)
Sum x.sum('time') x.sum('time') *

Lookup in DataArray

Dimension lookup Index lookup python MATLAB
Positional By integer da[:,0] da(:,0)
Positional By label da[:,'IA']
By name By integer da.isel(space=0)
da[dict(space=0)]
da(space=1) *
By name By label da.sel(space='IA')
da.loc[dict(space='IA')]
da.sel(space='IA')
da.sel('space', 'IA')