{"action":"closed","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4145","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4145/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4145/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4145/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/4145","id":55163844,"number":4145,"title":"sklearn.utils.shuffle does not work with arrays of dim > 2","user":{"login":"cancan101","id":51059,"avatar_url":"https://avatars.githubusercontent.com/u/51059?v=3","gravatar_id":"","url":"https://api.github.com/users/cancan101","html_url":"https://github.com/cancan101","followers_url":"https://api.github.com/users/cancan101/followers","following_url":"https://api.github.com/users/cancan101/following{/other_user}","gists_url":"https://api.github.com/users/cancan101/gists{/gist_id}","starred_url":"https://api.github.com/users/cancan101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cancan101/subscriptions","organizations_url":"https://api.github.com/users/cancan101/orgs","repos_url":"https://api.github.com/users/cancan101/repos","events_url":"https://api.github.com/users/cancan101/events{/privacy}","received_events_url":"https://api.github.com/users/cancan101/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-22T15:07:12Z","updated_at":"2015-01-22T16:26:23Z","closed_at":"2015-01-22T16:26:23Z","body":"Running this:\r\n```python\r\nsklearn.utils.shuffle(np.zeros((10,3,3)))\r\n```\r\nresults in:\r\n```\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-232-9debda69420a> in <module>()\r\n----> 1 shuffle(np.zeros((10,3,3)))\r\n\r\n/usr/local/lib/python2.7/dist-packages/sklearn/utils/__init__.pyc in shuffle(*arrays, **options)\r\n    317     \"\"\"\r\n    318     options['replace'] = False\r\n--> 319     return resample(*arrays, **options)\r\n    320 \r\n    321 \r\n\r\n/usr/local/lib/python2.7/dist-packages/sklearn/utils/__init__.pyc in resample(*arrays, **options)\r\n    236             max_n_samples, n_samples))\r\n    237 \r\n--> 238     arrays = check_arrays(*arrays, sparse_format='csr')\r\n    239 \r\n    240     if replace:\r\n\r\n/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.pyc in check_arrays(*arrays, **options)\r\n    285             if not allow_nd and array.ndim >= 3:\r\n    286                 raise ValueError(\"Found array with dim %d. Expected <= 2\" %\r\n--> 287                                  array.ndim)\r\n    288 \r\n    289         if copy and array is array_orig:\r\n\r\nValueError: Found array with dim 3. Expected <= 2\r\n```\r\n\r\nHowever the [docs](http://scikit-learn.org/stable/modules/generated/sklearn.utils.shuffle.html) make no mention of this restriction. Further, I see no reason that shuffle should not work with 3 dimensions. For example if I have an array of image data, I want some way of shuffling the data. "}}