python - Converting list to numpy array -
python - Converting list to numpy array -
i have managed load images in folder using command line sklearn: load_sample_images()
i convert numpy.ndarray format float32 datatype
i able convert np.ndarray using : np.array(x), np.array(x, dtype=np.float32) , np.asarray(x).astype('float32') give me error:
valueerror: setting array element sequence. is there way work around this?
from sklearn_theano.datasets import load_sample_images import numpy np
kinect_images = load_sample_images() x = kinect_images.images
x_new = np.array(x) # works x_new = np.array(x[1], dtype=np.float32) # works
x_new = np.array(x, dtype=np.float32) # not work
python numpy scikit-learn
Comments
Post a Comment