Raise TypeError instead of ValueError for invalid types (#38660)

* Raise TypeError instead of ValueError for invalid types.

* Removed un-necessary changes.

* Resolved conflicts

* Code quality

* Fix failing tests.

* Fix failing tests.
This commit is contained in:
Sai-Suraj-27
2025-07-21 18:12:00 +05:30
committed by GitHub
parent 822c5e45b2
commit 970d9a75ce
45 changed files with 48 additions and 50 deletions

View File

@@ -246,7 +246,7 @@ class ImageTransformsTester(unittest.TestCase):
# Test that exception is raised if inputs are incorrect
# Not a numpy array image
with self.assertRaises(ValueError):
with self.assertRaises(TypeError):
normalize(5, 5, 5)
# Number of mean values != number of channels