3 ms·
Pandas does give indexes and columns named entries, so this is less of an issue there, and everything has only 2 dimensions. In numpy it's a real problem. xarra
by tgb 6y ago
Pandas does give indexes and columns named entries, so this is less of an issue there, and everything has only 2 dimensions. In numpy it's a real problem. xarray is a library trying to fix that, though I haven't tried it yet. [1]
[1] http://xarray.pydata.org/en/stable/ http://xarray.pydata.org/en/stable/
- lambdatronics 6y agoI use xarray ever day. It's great for my workflows, which involve multidimensional datasets (typically scalar or vector fields evaluated or measured on 1D,2D,or 3D grids, sometimes including both Cartesian and polar or more exotic coordinates). I can read in an HDF5 file from a simulation & instantly make plots that automatically have meaningful axis labels. It saves me a ton of boilerplate. There are some gotchas with the HDF5 reader trying to infer dimension relationships that aren't specified in files. Sometimes merging datasets can wrong: if a 'join' is supposed to take place along a dimension whose values are floats, the result will be empty even if there is machine-epsilon offset between the two versions of the same dimension. Or,you can get an 'outer product' by accident and crash the interpreter by trying to allocate too much memory.