[Numpy-discussion] reading in files with fixed with format

Wolfgang Kerzendorf wkerzendorf at googlemail.com
Thu Jul 7 05:22:17 EDT 2011


Thanks. That is exactley what I need.

On 7/07/11 10:51 AM, Miguel de Val-Borro wrote:
> The function numpy.genfromtxt reads text files into arrays. There is an
> example on how to deal with fixed-width columns using the delimiter
> argument in the docstring and in the I/O chapter of the user guide:
> http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html#the-delimiter-argument
>
> Miguel
>
> On Thu, Jul 07, 2011 at 09:51:28AM +0200, Wolfgang Kerzendorf wrote:
>> Dear all,
>>
>> I have a couple of data files that were written with fortran at a fixed
>> with. That means its tabular data which might not have spaces (it is
>> just specified how many characters each field has and what type it is).
>> Is there anything to read that with scipy and or numpy?
>>
>> Cheers
>>       Wolfgang
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list