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

DM-34875: Expect Astropy instead of Pandas for objectTable in tests. #125

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

Conversation

TallJimbo
Copy link
Member

No description provided.

coadd_coord = geom.SpherePoint(cat["coord_ra"].values[index]*geom.degrees,
cat["coord_dec"].values[index]*geom.degrees)
coadd_coord = geom.SpherePoint(cat["coord_ra"][index]*geom.degrees,
cat["coord_dec"][index]*geom.degrees)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all fine, but the flexible thing to do is np.asarray(cat["coord_ra"])[index] which will work with any input that supports numpy __array__ access without doing a data copy. (including pandas, astropy, etc)

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.

2 participants