Skip to content

Commit 4ac95ce

Browse files
authored
Missing datatype in assertion (microsoft#23578)
1 parent a2b7a48 commit 4ac95ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onnxruntime/python/tools/quantization/base_quantizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, **data: dict[str, Any]):
4242
for k, v in data.items():
4343
if not isinstance(k, str):
4444
raise TypeError(f"Keys must be strings not {type(k)} for k={k!r}.")
45-
if k != "axis" and not isinstance(v, (int, str, np.ndarray)):
45+
if k != "axis" and not isinstance(v, (int, str, np.ndarray, float)):
4646
raise TypeError(f"Values must be numpy arrays, int, float, str not {type(v)} for k={k!r}.")
4747
if k == "axis" and not isinstance(v, int) and v is not None:
4848
raise TypeError(f"Axis value must be an int or None, not {type(v)}.")

0 commit comments

Comments
 (0)