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

Background: input array dtype not supported: int16 #50

Closed
ricardogando opened this issue Feb 16, 2017 · 2 comments
Closed

Background: input array dtype not supported: int16 #50

ricardogando opened this issue Feb 16, 2017 · 2 comments

Comments

@ricardogando
Copy link

Hi,
I downloaded a FITS image from ds9 (for teaching purposes) and wanted to analyze it with sep. Going through the tutorial (I used fitsio) I got the following at the background part.

`bkg = sep.Background(data)

ValueError Traceback (most recent call last)
in ()
----> 1 bkg = sep.Background(data)

sep.pyx in sep.Background.cinit (sep.c:4492)()

sep.pyx in sep._parse_arrays (sep.c:3672)()

sep.pyx in sep._get_sep_dtype (sep.c:2908)()

ValueError: input array dtype not supported: int16
`
Any ideas?
Thanks,
Ricardo

@kbarbary
Copy link
Owner

Try converting your data to a supported type, such as int32:

data = numpy.asarray(data, dtype=np.int32)

@ricardogando
Copy link
Author

Thanks, it worked!

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