pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.63k stars 1.09k forks source link

Allow wrapping `np.ndarray` subclasses #9760

Closed slevang closed 1 week ago

slevang commented 1 week ago

Continuation of #9705, implements this logic.

slevang commented 1 week ago

Do we need to check that np.matrix is cast to just numpy?

Do you mean explicitly test that np.matrix is cast to np.ndarray, or something else?

keewis commented 1 week ago

Do we need to check that np.matrix is cast to just numpy?

Do you mean explicitly test that np.matrix is cast to np.ndarray, or something else?

that it is properly cast to numpy.ndarray, sorry. We might need to silence a deprecation warning for that, though.

tien-vo commented 1 week ago

@slevang thanks for taking charge. I've been busy, so haven't got time for #9705. When this is merge, I'll close the draft PR.

keewis commented 1 week ago

I've added your PR to the list of "issues" that will be closed by this PR, so hopefully it should be closed automatically.

tien-vo commented 1 week ago

@keewis Thanks! But #9704 is the progress tracker. I think you mean to add #9705?