Then genfromtxt method of numpy load an ndarray from a text file.
However, if the text file is empty, the method would raised an IOError
while I expected an empty ndarray
:
IOError: End-of-file reached before encountering data.
Is there any solution to get an empty ndarray if the text file is emtpy?