I have a matrix of floats of 3000 by 17, the theme is that in the first column I want to save strings.
With the following code:
tabla = numpy.empty((3000, 17))
nombres = ['i0{i}_0{d}_{n}.bmp'.format(i = imagen, d = distorsion, n =
nivel) for imagen in range(1,26) for distorsion in range(1,25) for
nivel in range(1,6)]
tabla[:, 0] = nombres
Obviously python gives the following error:
ValueError: could not convert string to float: 'i01_01_1.bmp'
But I do not want to convert the strings to float, but save strings in that column, in the rest of the matrix I will have float values.
I hope you can help me.
Thank you very much already.
Greetings.
Lucia