Closed dannygoldstein closed 8 years ago
In [1]: import sncosmo In [2]: ebv = 0.1 In [3]: r_v = 3.1 In [4]: hsiao = sncosmo.get_source('hsiao') In [5]: wave = hsiao._wave In [6]: flux = hsiao.flux(hsiao._phase, wave) In [7]: extinction.apply(extinction.odonnell94(wave, ebv*r_v, r_v), flux) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-9-339ad1033c9c> in <module>() ----> 1 extinction.apply(extinction.odonnell94(wave, ebv*r_v, r_v), flux) extinction.pyx in extinction.apply (extinction.c:6377)() ValueError: Buffer has wrong number of dimensions (expected 1, got 2)
This is in apply, not odonnell94. apply only takes 1-d arrays (it doesn't do broadcasting).
apply
odonnell94
Closed by #3