Fix _check_shape str formatting for variadics

This commit is contained in:
Alex Ford
2024-03-06 20:21:03 +01:00
committed by Patrick Kidger
parent 1b3173ac01
commit 5e2518c591
+1 -1
View File
@@ -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: