[ncl-talk] file with each line having varied length
Dennis Shea
shea at ucar.edu
Thu May 18 08:44:23 MDT 2017
The question leaves out many details. What is it that you want?
x = asciiread("foo.txt",-1,"integer") ; x will be one-dimensional
nx = dimsizes(x)
print("nx="+nx)
print("---")
print(x)
On Wed, May 17, 2017 at 11:25 PM, Zhang, Xiao <xiao.zhang at pnnl.gov> wrote:
> Hi I have a question in processing a file. Each line of this file has
> different length. For example, first line has 5 integers and second line
> has 9. And there are over 4000 lines. Is there a good way to deal with it?
> Thanks!
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170518/f146e9a2/attachment.html
More information about the ncl-talk
mailing list