Advertisement
Guest User

Untitled

a guest
Sep 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. counter=0
  2. data_matrix=np.array([])
  3. comp=0
  4. temp=np.array([])
  5. for i in data:
  6. print(counter)
  7. if counter>3 and counter<33713278 and comp<21:
  8. temp=np.append(temp, [[i]])
  9. comp+=1
  10. if temp.size!=0 and len(temp)==21:
  11. data_matrix=np.append(data_matrix, [[temp]])
  12. comp=0
  13. temp=np.array([])
  14. counter+=1
  15. print(data_matrix.shape)
  16. data_matrix.dump('format_data.mat')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement