Skip to content

Commit 3298613

Browse files
committed
Fix
1 parent ed8a771 commit 3298613

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

neural_network/input_data.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,8 @@ def __init__(
156156
self._rng = np.random.default_rng(seed1 if seed is None else seed2)
157157
dtype = dtypes.as_dtype(dtype).base_dtype
158158
if dtype not in (dtypes.uint8, dtypes.float32):
159-
raise TypeError(
160-
"Invalid image dtype {!r}, expected uint8 or float32".format(dtype)
161-
)
159+
msg = f"Invalid image dtype {dtype!r}, expected uint8 or float32"
160+
raise TypeError(msg)
162161
if fake_data:
163162
self._num_examples = 10000
164163
self.one_hot = one_hot

0 commit comments

Comments
 (0)