-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structured numpy arrays, xarray and netCDF(4) #1626
Comments
It is a little challenging to make structured arrays work with all of xarray's computational tools. For example, we don't have a good way to handle missing values. Also, in my experience, non-structured arrays are a nicer to work with in most cases, and a tool like xarray makes it pretty easy to unpack non-structured arrays into multiple arrays in a That said, we've added some work arounds in the past to ensure that structured arrays work in xarray, and I would be happy to accept contributions to write them to netCDF files. I'm sure there are others who would also find this useful. |
I'd also like to see better support for compound types, writing them for starters. I'll collect some information here:
Is there anything I've missed? Can someone shed light on whether |
I just got bit with this as well. I was basically using tuples of indices as coordinates in order to implement a multidimensional sparse array . My workaround is to use plain dimension I've come up with an ugly method for selecting by
|
This is an ancient issue, but still - wondering if anyone here managed to hack together some workarounds? |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
Still relevant. |
I'm trying to use xarray as the underlying container for some data processing tasks. Part of the pipeline includes processing from non-standard/easily readable formats (e.g. ROS messages) to standard formats, e.g. netCDF(4). The data I tend to be working on is time series data that is structured, which maps pretty well to structured numpy arrays using dtype manipulations. And xarray lightly wraps numpy, and provides netCDF as a backend. However, the xarray implementation doesn't really expose this capability, supported in netCDF as 'compound data types', and in fact it fails when you try and write such a
DataArray
/Dataset
to file (at _nc4_values_and_dtype).So the question is, is this a reasonable feature/expectation from xarray (and thus you're receptive to contributions), or is this outside the goal/purpose (I should roll my own/use pandas/etc)?
The text was updated successfully, but these errors were encountered: