Passing a specific Xarry Data Variable into a New Numpy Array
Try ds.x.values, where ds is the name of your dataset. .x (which is equivalent to ds["x"]) gets the x dataarray from your dataset and .values returns the numpy array with its values.
I have a xarray dataset, with data variables of:
Data variables:
    hid      (particle) float32 ...
    d        (particle) float32 ...
    x        (particle) float32 ...
    y        (particle) float32 ...
    z        (particle) float32 ...
    image    (hologram_number, xsize, ysize) uint8 ...
I am wondering if there is a way to take all of the x values for my 10,000 data points, and pass them into a new one dimensional numpy array? Any sort of direction would be amazing. I have been reading the xarray.Dataset API and I'm not really getting anywhere.