Skip to content

Commit

Permalink
nan mean fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BalzaniEdoardo committed Dec 18, 2024
1 parent b95b4af commit 2682aac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nemos/initialize_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def initialize_intercept_matching_mean_rate(
# return inverse if analytical solution is available
analytical_inv = INVERSE_FUNCS.get(inverse_link_function, None)

means = jnp.atleast_1d(jnp.mean(y, axis=0))
means = jnp.atleast_1d(jnp.nanmean(y, axis=0))
if analytical_inv:
out = analytical_inv(means)
if jnp.any(jnp.isnan(out)):
Expand Down

0 comments on commit 2682aac

Please sign in to comment.