I have a bunch of numpy arrays, and i'm trying to check the type of the values within each array as some of them contain stars which cause the entire array to become of type string and others are floats. I want to be able to check an array and see if it contains floats or strings. Code below:
nums = np.array([123, 54, 645, 89, 465, 98])
nums2 = np.array(['4', '987', '*65*', '89'])
Is there a way to write some kind of loop to check this? My ideal output would be along the lines of:
nums = float
nums2 = string