You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an int is passed into atmos.rays instead of a float, e.g. due to the case of ctx.compute_rays(wave, 1), it is not caught by the non-iterable check, as this checks isinstance(muz, float). This cascades onwards causing a number of issues, resulting in failure to create a new Context.
Further if one instead puts a list with a singular int, different but similar issues arise due to types getting carried over somewhere, and being incompatible with the backend memory views (e.g. ctx.compute_rays(wave, [1])).
The best fix here is likely to be using something like np.asarray(muz, dtype=np.float64) instead of the current checks (and then ensuring that it's 1- and not 0-dimensional).
For now this issue can be worked around by only passing floats to the mu argument: e.g. ctx.compute_rays(wave, 1.0).
The text was updated successfully, but these errors were encountered:
If an int is passed into
atmos.rays
instead of a float, e.g. due to the case ofctx.compute_rays(wave, 1)
, it is not caught by the non-iterable check, as this checksisinstance(muz, float)
. This cascades onwards causing a number of issues, resulting in failure to create a new Context.Further if one instead puts a list with a singular int, different but similar issues arise due to types getting carried over somewhere, and being incompatible with the backend memory views (e.g.
ctx.compute_rays(wave, [1])
).The best fix here is likely to be using something like
np.asarray(muz, dtype=np.float64)
instead of the current checks (and then ensuring that it's 1- and not 0-dimensional).For now this issue can be worked around by only passing floats to the mu argument: e.g.
ctx.compute_rays(wave, 1.0)
.The text was updated successfully, but these errors were encountered: