BUG: Raise proper TypeError for scalar indexer in Index.take
- [x ] closes https://github.com/pandas-dev/pandas/issues/42875#issuecomment-892736707
- [ x] tests added / passed
- [ x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x ] whatsnew entry

Fixes: https://github.com/pandas-dev/pandas/issues/42875#issuecomment-892736707
TypeError is being raised on passing scalar value in DataFrame.take
Hello @radioactive11! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



* In the file [`pandas/tests/indexes/test_indexing.py`](https://github.com/pandas-dev/pandas/blob/e250e0ba74c484df1f21403f0d339d3d7834f6cd/pandas/tests/indexes/test_indexing.py):

> [Line 74:89](https://github.com/pandas-dev/pandas/blob/e250e0ba74c484df1f21403f0d339d3d7834f6cd/pandas/tests/indexes/test_indexing.py#L74): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (100 > 88 characters)



##### Comment last updated at 2021-09-25 12:57:16 UTC you will have to add a test for this @jreback From what I understand, I should add a test to check whether this exception is being raised on passing a scalar value, right?  @jorisvandenbossche I have made the following changes as per your suggestions
- Checking for dimensions: if not a 1-dimensional array, then raise a TypeError
- Added a test to verify whether TypeError is being raised on passing a scalar/non 1 dimension array @jreback I have made changes as per your suggestions. I also added `match` parameter in the test as @debnathshoham suggested @debnathshoham I have made the changes as per your suggestions and the tests are passing as well. Please have a look and do suggest if further changes need to be made. @jreback I changed it to `indices.ndim != 1` as per your suggestions. Also added a test case with indices being two-dimensional there are a number of failing tests @jreback I removed a blank line which was causing a flake8 test to fail. However I can still see a number of cancelled tests. When I run a subset of the tests which deal with the indexer (`pytest pandas/tests/indexes/test_indexing.py` to be specific), all of them pass.  > @jreback I removed a blank line which was causing a flake8 test to fail. However I can still see a number of cancelled tests. When I run a subset of the tests which deal with the indexer (`pytest pandas/tests/indexes/test_indexing.py` to be specific), all of them pass.

your change as small as it is, is possibly affecting other tests, you will need to investigate
 Appears this PR has been dormant for a while and the CI is still failing so closing. If you're interested in continuing please merge master, ensure the tests are passing and we can reopen