Skip to content
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

Quantity 2.0 #91

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Quantity 2.0 #91

wants to merge 1 commit into from

Conversation

nstarman
Copy link
Member

@nstarman nstarman commented Dec 27, 2023

Signed-off-by: nstarman <nstarman@users.noreply.github.com>
@pllim
Copy link
Member

pllim commented Feb 1, 2024

I totally missed this one, so I am confused why there is a APE 23 and APE 25 here. And why report is in PDF instead of Markdown.

Is this related to the following?

@nstarman
Copy link
Member Author

nstarman commented Feb 1, 2024

so I am confused why there is a APE 23 and APE 25 here

I'll clean that up.

The report is in PDF instead of Markdown.

The report was for the Moore grant, not the APE. I'm including the PDF to eventually turn into an APE, written in Markdown.

@byrdie
Copy link

byrdie commented Mar 12, 2024

@nstarman, I think this looks really good so far, I'm quite excited to work with other arrays inside Quantity!

I was wondering if you have given any thought to supporting arrays with labeled axes (e.g. xarray) during this effort? I think supporting xarray (or the other way around, xarray supporting Quantity) is really important going forward, and I think it's worth considering adding first-class support this feature for Quantity 2.0.

@MridulS
Copy link

MridulS commented Mar 12, 2024

xarray already has support for units via https://github.com/xarray-contrib/pint-xarray, so making astropy.units compatible with xarray would solve this right?

@byrdie
Copy link

byrdie commented Mar 12, 2024

I guess it depends on how we want to interact with the rest of the astropy ecosystem, for example: how can we make astropy.coordinates work with and propagate labeled axes? Is it easier to convert the underlying data buffers of SkyCoord etc. to instances of xarray, or make Quantity wrap xarray so only have to make minimal changes to astropy.coordinates?

@nstarman
Copy link
Member Author

Support for x-array has to use their framework, which is how pint does it.
There already are unofficial libraries, like https://github.com/KaoruNishikawa/xarray-quantity to do this. With Quantity 2.0 we should make a coordinated package official version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants