Skip to content

Commit a48c51b

Browse files
hamzehhamzeh
authored andcommitted
Removed unnecessary variable n_dim in utils.check_arrays, removed unnecessary parens in same place
1 parent eb04ccb commit a48c51b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sklearn/utils/validation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,10 @@ def check_arrays(*arrays, **options):
249249
else:
250250
array = np.asarray(array, dtype=dtype)
251251
_assert_all_finite(array)
252-
n_dim = array.ndim
253252

254-
if n_dim > 2:
255-
raise ValueError("Found array with n_dim %d. Expected <= 2" %
256-
(n_dim))
253+
if array.ndim > 2:
254+
raise ValueError("Found array with dim %d. Expected <= 2" %
255+
array.ndim)
257256

258257
if copy and array is array_orig:
259258
array = array.copy()

0 commit comments

Comments
 (0)