difference between {str} and {str_} in Python
python, string
Solution
`str` is probably the builtin `str`. `str_` is something else. Perhaps a subclass of `str`? Hard to tell without seeing more
Edit:
Looks like `str_` may be `numpy.str_` which is what you'll get if you pour a list of str into a numpy array
Problem
I am trying to debug a code in Python. When I go to debug mode and look at the variable `word` in a similar code that works fine, I see the type of this variable is shown as `{str}`, but in the other code that does not work correctly I see the type of `word` in the debugger is shown as `{str_}`. What is the difference between these and how can I convert a variable type `{str_}` to a type `{str}`. Here is part of the code: ``` cv = CountVectorizer(min_df=1, charset_error="ignore", stop_words="english", max_features=200) counts = cv.fit_transform([text]).toarray().ravel() words = np.array(cv.get_feature_names()) ... for word, count in zip(words, counts): ``` I use PyCharm to debug, and it is in Python 3.3. I appreciate any help on this.