I'm having a hard time trying to concatenate two arrays using numpy.
One of the arrays have text (string
) and the other array have numbers (int64
).
How do I do that?
Using np.concatenate()
set all the values as string and need both.
I'm running a for loop to determinate the hyperparameters of a RandomForestClassifier
... when the loop goes to the numbers, gives an error since is expecting the numbers and get the string '1'
or '2'
.
I'm using
np.concatenate((['auto'], np.arange(20, 120, 20)), axis=0, out=None)
and getting
array(['auto', '20', '40', '60', '80', '100'], dtype='<U11')
However, I need
array(['auto', 20, 40, 60, 80, 100])