more files with confirmed python3 compatibility

This commit is contained in:
Martin Diehl 2018-11-16 09:02:31 +01:00
parent b5b2b68206
commit a3647cc587
16 changed files with 27 additions and 27 deletions

@ -1 +1 @@
Subproject commit 3810987d64d232a7fc9e709c036f7a19d6e4d027
Subproject commit 1b31d1239393cfe3322a341df3b3b846328a6733

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import sys,os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math,re,time,struct

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math
@ -63,7 +63,7 @@ parser.set_defaults(center = (.0,.0,.0),
if options.dimension is None:
parser.error('no dimension specified.')
if options.angleaxis is not None:
options.angleaxis = map(float,options.angleaxis)
options.angleaxis = list(map(float,options.angleaxis))
rotation = damask.Quaternion().fromAngleAxis(np.radians(options.angleaxis[0]) if options.degrees else options.angleaxis[0],
options.angleaxis[1:4])
elif options.quaternion is not None:
@ -137,17 +137,17 @@ for name in filenames:
indexing='ij')
# Padding handling
X = np.roll(np.roll(np.roll(X,
-grid[0]/2, axis=0),
-grid[1]/2, axis=1),
-grid[2]/2, axis=2)
-grid[0]//2, axis=0),
-grid[1]//2, axis=1),
-grid[2]//2, axis=2)
Y = np.roll(np.roll(np.roll(Y,
-grid[0]/2, axis=0),
-grid[1]/2, axis=1),
-grid[2]/2, axis=2)
-grid[0]//2, axis=0),
-grid[1]//2, axis=1),
-grid[2]//2, axis=2)
Z = np.roll(np.roll(np.roll(Z,
-grid[0]/2, axis=0),
-grid[1]/2, axis=1),
-grid[2]/2, axis=2)
-grid[0]//2, axis=0),
-grid[1]//2, axis=1),
-grid[2]//2, axis=2)
else: # nonperiodic, much lighter on resources
# change to coordinate space where the primitive is the unit sphere/cube/etc
(X, Y, Z) = np.meshgrid(np.arange(0, grid[0], dtype=np.float32),

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math
@ -46,7 +46,7 @@ parser.set_defaults(origin = (0.0,0.0,0.0),
datatype = 'f' if options.real else 'i'
sub = {}
for i in range(len(options.substitute)/2): # split substitution list into "from" -> "to"
for i in range(len(options.substitute)//2): # split substitution list into "from" -> "to"
sub[int(options.substitute[i*2])] = int(options.substitute[i*2+1])
# --- loop over input files ----------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# -*- coding: UTF-8 no BOM -*-
import os,sys,math