From 5e2518c591a2e6cc066f4a23e89bfa1b080c55f3 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Tue, 5 Mar 2024 21:23:38 +0000 Subject: [PATCH] Fix _check_shape str formatting for variadics --- jaxtyping/_array_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaxtyping/_array_types.py b/jaxtyping/_array_types.py index 7342701..d8d0a19 100644 --- a/jaxtyping/_array_types.py +++ b/jaxtyping/_array_types.py @@ -229,7 +229,7 @@ class _MetaAbstractArray(type): return _check_dims(cls.dims, obj.shape, single_memo, arg_memo) else: if obj.ndim < len(cls.dims) - 1: - return f"this array has {obj.ndim} dimensions, which is fewer than {len(cls.dims - 1)} that is the minimum expected by the type hint" # noqa: E501 + return f"this array has {obj.ndim} dimensions, which is fewer than {len(cls.dims) - 1} that is the minimum expected by the type hint" # noqa: E501 i = cls.index_variadic j = -(len(cls.dims) - i - 1) if j == 0: