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

formulae.__vectorize doesn't work and not tested #1254

Open
claresinger opened this issue Jan 25, 2024 · 1 comment
Open

formulae.__vectorize doesn't work and not tested #1254

claresinger opened this issue Jan 25, 2024 · 1 comment
Assignees

Comments

@claresinger
Copy link
Collaborator

requires work around like here

if model in ("CompressedFilmRuehl", "SzyszkowskiLangmuir"):
    for j,vw in enumerate(v_wet):
        sigma[j] = formulae.surface_tension.sigma(T, vw, v_dry, aerosol.modes[0]['f_org'])
else:
    sigma = formulae.surface_tension.sigma(T, v_wet, v_dry, aerosol.modes[0]['f_org'])

implemented here, but untested

PySDM/PySDM/formulae.py

Lines 167 to 181 in 29e22e3

if hasattr(func, "__vectorize"):
vectorizer = (
np.vectorize
if numba.config.DISABLE_JIT # pylint: disable=no-member
else numba.vectorize(
"float64(" + ",".join(["float64"] * n_params) + ")",
target="cpu",
nopython=True,
**{
k: v
for k, v in conf.JIT_FLAGS.items()
if k not in ("parallel", "error_model")
},
)
)

Copy link

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2024
@slayoo slayoo reopened this Jul 6, 2024
@slayoo slayoo removed the no-activity label Jul 6, 2024
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