converted the assert error to TypeError with proper informative message
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

Hello @harshitsinha6! 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/core/indexes/base.py`](https://github.com/pandas-dev/pandas/blob/4b47bbaf069d08bd33ed15e0b1582b0f86399b34/pandas/core/indexes/base.py):

> [Line 637:1](https://github.com/pandas-dev/pandas/blob/4b47bbaf069d08bd33ed15e0b1582b0f86399b34/pandas/core/indexes/base.py#L637): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace



##### Comment last updated at 2021-08-27 14:50:10 UTC Please add tests if this is somehow visible > Please add tests if this is somehow visible

I am not able to see/find the test file. If possible can you please share the file path? will look into that. Please run pre-commit locally before pushing. You have a linting bug.

What are you using to reproduce the error? Test belongs somewhere into the tests/indexes folder > Please run pre-commit locally before pushing. You have a linting bug.
> 
> What are you using to reproduce the error? Test belongs somewhere into the tests/indexes folder



> Please run pre-commit locally before pushing. You have a linting bug.
> 
> What are you using to reproduce the error? Test belongs somewhere into the tests/indexes folder

@phofl since I am beginner, can you please point out that linting bug because in local it is running properly. > what are you trying to do?
> this is an internal assertion
> if it's violated then that is a bug
> making a type error is not useful

"BUG: wrong/confusing error message in DataFrame.take with a scalar indexer"
and  "take requires an array-like for the indexer, but when passing a scalar you get a not very useful error message as above. **We should raise a ValueError (or rather TypeError) instead with an informative message."**_

I thought, this was the issue.

 sure but this is way too low level
you should validate this in .take itself > sure but this is way too low level
> you should validate this in .take itself

yes, but the error arises in "assert isinstance(values, np.ndarray), type(values)" and as per the requirement we have to display proper message with proper error.
but in .take it is not raising any error or it showing any relevant message. @harshitsinha6 looks to already be being fixed in #42886? Also see that pr for what was meant by validating in take, not here closing as a duplicate of #42886