We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2044b57 commit 0ec672fCopy full SHA for 0ec672f
lib/matplotlib/cm.py
@@ -373,8 +373,8 @@ def set_array(self, A):
373
374
A = cbook.safe_masked_invalid(A, copy=True)
375
if not np.can_cast(A.dtype, float, "same_kind"):
376
- raise TypeError("Image data of dtype {} cannot be converted to "
377
- "float".format(A.dtype))
+ raise TypeError(f"Image data of dtype {A.dtype} cannot be "
+ "converted to float")
378
379
self._A = A
380
0 commit comments