Skip to content

Commit 5182e0d

Browse files
ligerlacmatthewfeickert
authored andcommitted
bugfix: ensure type before jnp.tile
1 parent 316bcae commit 5182e0d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pyhf/tensor/jax_backend.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def tile(self, tensor_in, repeats):
165165
Returns:
166166
JAX ndarray: The tensor with repeated axes
167167
"""
168+
if not isinstance(tensor_in, jnp.ndarray):
169+
tensor_in = jnp.array(tensor_in)
168170
return jnp.tile(tensor_in, repeats)
169171

170172
def conditional(self, predicate, true_callable, false_callable):

0 commit comments

Comments
 (0)