Study Notes (10): NumPy data analysis -NumPy create an array of methods -fromfile

Learning immediately: https://edu.csdn.net/course/play/25878/316059?utm_source=blogtoedu

fromfile:

      a1=np.arange(6).reshape(2,3)

      print(a1)

      with open('test.data','w') as if:

               a=np.fromfile(f,dtype=int)

               print(a,reshape(2,3))

       with open('test.data') as if:

                a=np.fromfile(f,dtype=int)

                print(a.reshape(2,3))

Published 24 original articles · won praise 8 · views 1171

Guess you like

Origin blog.csdn.net/qq_41739233/article/details/104241515