The idea is that the text file has 150 rows where each row is a string of 1024 bits (a representation of a 32x32 image).
What i want to achieve is to have an array of 150 elements where every element is an array of size 1024.
By trying the code below i get an array of 150 elements with inf value. Is there a way to convert those values to vectors using numpy's loadtxt directly.
Thank you in advance!
import numpy as np
data = np.loadtxt("digits.txt")
0and1? If not, how are the binary vectors represented in the file?.read(128)for each 1024 bits... no newlines ("rows") needed.loadtxtdocs? Default dtype is float. If you have a 1000 digits without delimiter, it tries to make one number from that. Theinfvalue is likely.