hope all is well...I'm making a dataset feed into sklearn algorithms for categorization and couldn't find any easy datasets to start out with so making my own.
got a problem, though...
import numpy as np
import random
type_1 = [random.randrange(0, 30, 1) for i in range(50)]
type_1_label = [1 for i in range(50)]
type_2 = [random.randrange(31, 75, 1) for i in range(50)]
type_2_label = [-1 for i in range(50)]
zipped_1 = zip(type_1, type_1_label)
zipped_2 = zip(type_2, type_2_label)
ready = np.array(zipped_1)
print(ready[1])
the problem here is that when I zip type one label with type one, the output is an array, of arrays with two indexes, as is expected, and then I need to feed it into a numpy array which returns IndexError: too many indices for array which does not make sense to me; as surely numpy can read a 2x2 array for its N-dimensional array functions? any help would be appreciated!
print(ready[1])because you are using Python 3? –