forked from dshaver14/wirehexmesher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbintoascii.py
31 lines (22 loc) · 832 Bytes
/
bintoascii.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import numpy as np
import math
import os
import time
def main():
x = np.fromfile('xmesh_v5f.out',dtype=float)
x = np.reshape(x,(-1,27),order='F')
np.savetxt('xmesh_v5f.out',x,fmt='%12.8f',delimiter=',')
print("printed in %s"%(time.time()-starttime))
y = np.fromfile('ymesh_v5f.out',dtype=float)
y = np.reshape(y,(-1,27),order='F')
np.savetxt('ymesh_v5f.out',y,fmt='%12.8f',delimiter=',')
print("printed in %s"%(time.time()-starttime))
z = np.fromfile('zmesh_v5f.out',dtype=float)
z = np.reshape(z,(-1,27),order='F')
np.savetxt('zmesh_v5f.out',z,fmt='%12.8f',delimiter=',')
print("printed in %s"%(time.time()-starttime))
return
if __name__=="__main__":
starttime = time.time()
main()
print('--- Code ran in %s seconds ---'%(time.time()-starttime))