Skip to content

Is there a way to convert a xarray to numpy array? #5784

Answered by keewis
YosmelyBermudez asked this question in Q&A
Discussion options

You must be logged in to vote

what type does seisnc_vol have? If it's a DataArray object, the conversion should be as simple as accessing seisnc_vol.values or calling np.asarray(seisnc_vol) (since you already tried np.array(seisnc_vol) I'm guessing it's not). If it's a Dataset object, there are a few more steps involved.

Can you post the output of print(seisnc_vol)? That might make it easier to help you.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@YosmelyBermudez
Comment options

Answer selected by YosmelyBermudez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants