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

Small issues with Beam #127

Open
mhvk opened this issue Sep 30, 2024 · 1 comment
Open

Small issues with Beam #127

mhvk opened this issue Sep 30, 2024 · 1 comment

Comments

@mhvk
Copy link

mhvk commented Sep 30, 2024

As I was looking at the beam code for astropy/astropy#17096, I noticed a few oddities in Beam. Mostly that it inherits from Quantity, which I'm not sure is a good idea given that some basic methods are overwritten and many others would not work (e.g., you'd need a proper __array_finalize__ to deal with slicing, etc.; right now, you'd lose the extra attributes with you do beam[()]). If there are real advantages to using Beam, I'd recommend using SpecificTypeQuantity.

A second thing I happened to notice is that default_unit is not actually used as described in the docstring.

Anyway, just flyby comments - hopefully of some use.

@e-koch
Copy link
Collaborator

e-koch commented Oct 1, 2024

Thanks @mhvk ! I opened #128 to fix the specific issue in astropy/astropy#17096, and the default_unit description and usage.

agreed, we should look into switching to SpecificTypeQuantity. I don't think we otherwise have a specific need to inherit from Quantity

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

No branches or pull requests

2 participants