I have a numpy array X with dtype 'S' (numpy.bytes_). For example printing print(X[0, 0]) yields b'somestring'. Similarly str(X[0, 0]) returns string "b'somestring'".
However I need to print or convert to string so that it does not contain b' at the beginning and ' at the end. I just want to print somestring or return a string "somestring". How to do it?
Note: I cannot change the type of the array.