From 146f1c464f2c86ea179a90186b0a5515bd5e3349 Mon Sep 17 00:00:00 2001 From: RadostW Date: Wed, 23 Oct 2024 18:06:16 +0200 Subject: [PATCH] Revert to a_min from min for compatibility with python 3.8 --- pychastic/vectorized_I_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pychastic/vectorized_I_generation.py b/pychastic/vectorized_I_generation.py index c35e8d2..0416484 100644 --- a/pychastic/vectorized_I_generation.py +++ b/pychastic/vectorized_I_generation.py @@ -141,7 +141,7 @@ def take(tensor, idx, fill=0): # Non jit-friendly implementation # illegal = jnp.logical_or(idx > p,idx < 1) # return tensor[..., idx-1].at[..., illegal].set(fill) - legalized_idx = jnp.clip(idx, min=1, max=p) + legalized_idx = jnp.clip(idx, a_min=1, a_max=p) illegal_mask = jnp.logical_or(idx > p, idx < 1) return ( tensor[..., legalized_idx - 1] * (1 - 1 * illegal_mask)