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

ValueError: operands could not be broadcast together with shapes (38,12) (456,) #166

Open
mireianievas opened this issue Nov 11, 2024 · 3 comments

Comments

@mireianievas
Copy link

mireianievas commented Nov 11, 2024

While trying to use the gammapy backend, I stomped over some error related to the geometries of the arrays when evaluating the model.

It appears that Synchrotron.evaluate_tau_ssa() is flattening the emissivity array over energies, causing this error:

ValueError: operands could not be broadcast together with shapes (38,12) (456,)

Here 38 is the number of energy bins

@mireianievas
Copy link
Author

turning off the ssa also causes the error here

--> 317 sed_bb_disk = SSDisk.evaluate_multi_T_bb_norm_sed(
318 nu, z, L_disk, M_BH, m_dot, R_in, R_out, d_L
319 )

@cosimoNigro
Copy link
Owner

Hi @mireianievas, sorry for this bug.
I thought a similar problema been solved by #131.

Which Gammapy version are you using? 1.2?
I'll try to fix it.

@mireianievas
Copy link
Author

1.3 (dev)

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