I have this code:
import numpy as np
def printMe(myData):
print(myData)
print(type(myData))
print("length = " + str(len(myData)))
for x in myData:
print(x)
print(type(x))
if __name__ == '__main__':
myOtherData = np.array([123,"456"])
printMe(myOtherData)
The output is
['123' '456']
<class 'numpy.ndarray'>
length = 2
123
<class 'numpy.str_'>
456
<class 'numpy.str_'>
Why does 123 get converted to a string rather than converting the '456' to an integer?