Re: [Numpy-discussion] np.genfromtxt StopIteration Error

2019-10-11 Thread Bennet Fauber
What happens if you use this? for txtfile in filesList: data = np.genfromtxt(txtfile, dtype=str, usecols=(1), skip_header=27, skip_footer=1, encoding=None) print(data) That pulls one file name from filesList, stuffs the name into txtfile, which is then provided to genfromtxt(). The p

Re: [Numpy-discussion] np.genfromtxt StopIteration Error

2019-10-11 Thread Andras Deak
Hi Stephen, Is this not what your original question to this list was about? See https://mail.python.org/pipermail/numpy-discussion/2019-October/080130.html and replies. I still believe that you _can't_ give genfromtxt file names in an iterable. The iterable input is only inteded to contain the con

Re: [Numpy-discussion] np.genfromtxt StopIteration Error

2019-10-11 Thread Stephen P. Molnar
Thanks for the reply. Keep in mind that i am a Chemist, not an IT person. I used to be a marginally proficient FORTRAN II user in the ancient past. I tried running your code. Please see my comments/questing below: On 10/11/2019 01:12 PM, Bennet Fauber wrote: I think genfromtxt() wants a file

Re: [Numpy-discussion] np.genfromtxt StopIteration Error

2019-10-11 Thread Bennet Fauber
I think genfromtxt() wants a filename as the first argument, and you have to tell it the entries in the file are strings not numerics. test.py -- import os import glob import numpy as np fileList = [] filesList = [] for files in glob.glob("*.log"): fil

[Numpy-discussion] np.genfromtxt StopIteration Error

2019-10-11 Thread Stephen P. Molnar
I have been fighting with the genfromtxt function in numpy for a while now and am trying a slightly different approach. Here is the code: import os import glob import numpy as np fileList = [] filesList = [] for files in glob.glob("*.log"): fileName, fileExtension = os.path.splitext(fil