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

Accept integer wavelengths #6

Open
abostroem opened this issue Aug 3, 2017 · 1 comment
Open

Accept integer wavelengths #6

abostroem opened this issue Aug 3, 2017 · 1 comment

Comments

@abostroem
Copy link

When I make a numpy array of integers, I get a ValueError. It would be nice to be able to use integers as wavelengths. I don't speak Cython - is this an easy thing to implement?

Here is the call:
extinction.ccm89(np.array([2000]), 1, 3.1)

And the error:

ValueError Traceback (most recent call last)
in ()
----> 1 extinction.ccm89(np.array([2000]), 1, 3.1)

extinction.pyx in extinction.ccm89 (extinction.c:3133)()

ValueError: Buffer dtype mismatch, expected 'double' but got 'long'

@kbarbary
Copy link
Member

kbarbary commented Aug 8, 2017

Yeah this would be nice. (Also to accept scalars and lists.) When I tried this before it actually added significant overhead for small arrays, but I should check how bad it really was.

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