From 5d0964874743956d9fd5fa7134f86d529ed8bbe1 Mon Sep 17 00:00:00 2001 From: ursk Date: Mon, 20 Nov 2023 07:21:27 -0800 Subject: [PATCH] Fix test that failed because of an upstream change. PiperOrigin-RevId: 584019513 --- .../python/distributions/linear_gaussian_ssm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_probability/python/distributions/linear_gaussian_ssm.py b/tensorflow_probability/python/distributions/linear_gaussian_ssm.py index 0938fbd242..facb6e6b34 100644 --- a/tensorflow_probability/python/distributions/linear_gaussian_ssm.py +++ b/tensorflow_probability/python/distributions/linear_gaussian_ssm.py @@ -61,7 +61,7 @@ def _safe_concat(values): for x in values: try: full_values.append(ps.reshape(x, reference_shape)) - except (TypeError, ValueError): + except (TypeError, ValueError, ZeroDivisionError): # JAX/numpy don't like `-1`'s in size-zero shapes. full_values.append(ps.reshape(x, trivial_shape)) return ps.concat(full_values, axis=0)