pack causes trouble with tests ..
This commit is contained in:
parent
b2cdabd009
commit
c9f9f7c681
|
@ -132,7 +132,4 @@ for name in filenames:
|
|||
damask.util.croak(geom.update(np.where(mask,geom.microstructure,fill)))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -61,7 +61,7 @@ for name in filenames:
|
|||
canvas = np.full(new,options.fill if options.fill is not None
|
||||
else np.nanmax(geom.microstructure)+1,geom.microstructure.dtype)
|
||||
|
||||
l = np.clip( offset, 0,np.minimum(old +offset,new))
|
||||
l = np.clip( offset, 0,np.minimum(old +offset,new)) # noqa
|
||||
r = np.clip( offset+old,0,np.minimum(old*2+offset,new))
|
||||
L = np.clip(-offset, 0,np.minimum(new -offset,old))
|
||||
R = np.clip(-offset+new,0,np.minimum(new*2-offset,old))
|
||||
|
@ -71,4 +71,4 @@ for name in filenames:
|
|||
damask.util.croak(geom.update(canvas,origin=origin+offset*size/old,rescale=True))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
|
||||
geom.to_file(sys.stdout if name is None else name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -39,4 +39,4 @@ for name in filenames:
|
|||
geom = damask.Geom.from_file(StringIO(''.join(sys.stdin.read())) if name is None else name)
|
||||
damask.util.croak(geom.clean(options.stencil))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
geom.to_file(sys.stdout if name is None else name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -155,4 +155,4 @@ for name in filenames:
|
|||
homogenization=options.homogenization,comments=header)
|
||||
damask.util.croak(geom)
|
||||
|
||||
geom.to_file(os.path.splitext(name)[0]+'.geom')
|
||||
geom.to_file(os.path.splitext(name)[0]+'.geom',pack=False)
|
||||
|
|
|
@ -89,7 +89,4 @@ geom=damask.Geom(microstructure,options.size,
|
|||
comments=[scriptID + ' ' + ' '.join(sys.argv[1:])])
|
||||
damask.util.croak(geom)
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -145,7 +145,4 @@ geom = damask.Geom(microstructure.reshape(grid),
|
|||
homogenization=options.homogenization,comments=header)
|
||||
damask.util.croak(geom)
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -63,7 +63,4 @@ geom = damask.Geom(microstructure=np.full(options.grid,options.fill,dtype=dtype)
|
|||
comments=scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
damask.util.croak(geom)
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -152,7 +152,4 @@ for name in filenames:
|
|||
homogenization=options.homogenization,comments=header)
|
||||
damask.util.croak(geom)
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(os.path.splitext(name)[0]+'.geom')
|
||||
geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',pack=False)
|
||||
|
|
|
@ -302,7 +302,4 @@ for name in filenames:
|
|||
homogenization=options.homogenization,comments=header)
|
||||
damask.util.croak(geom)
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(os.path.splitext(name)[0]+'.geom')
|
||||
geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',pack=False)
|
||||
|
|
|
@ -172,7 +172,4 @@ for name in filenames:
|
|||
damask.util.croak(geom.update(microstructure[0:grid_original[0],0:grid_original[1],0:grid_original[2]]))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -44,4 +44,4 @@ for name in filenames:
|
|||
geom = damask.Geom.from_file(StringIO(''.join(sys.stdin.read())) if name is None else name)
|
||||
damask.util.croak(geom.mirror(options.directions,options.reflect))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
geom.to_file(sys.stdout if name is None else name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -34,4 +34,4 @@ for name in filenames:
|
|||
geom = damask.Geom.from_file(StringIO(''.join(sys.stdin.read())) if name is None else name)
|
||||
damask.util.croak(self.renumber)
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
geom.to_file(sys.stdout if name is None else name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -58,4 +58,4 @@ for name in filenames:
|
|||
geom.scale(new_grid)
|
||||
damask.util.croak(geom.update(microstructure = None,size = new_size))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
geom.to_file(sys.stdout if name is None else name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -95,4 +95,4 @@ for name in filenames:
|
|||
damask.util.croak(geom.update(microstructure,origin=origin-(np.asarray(microstructure.shape)-grid)/2*size/grid,rescale=True))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
|
||||
geom.to_file(sys.stdout if name is None else name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -58,7 +58,4 @@ for name in filenames:
|
|||
damask.util.croak(geom.update(substituted,origin=geom.get_origin()+options.origin))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
|
||||
if name is None:
|
||||
sys.stdout.write(str(geom.show()))
|
||||
else:
|
||||
geom.to_file(name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -82,4 +82,4 @@ for name in filenames:
|
|||
geom.microstructure + offset,geom.microstructure)))
|
||||
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
|
||||
|
||||
geom.to_file(sys.stdout if name is None else name)
|
||||
geom.to_file(sys.stdout if name is None else name,pack=False)
|
||||
|
|
|
@ -519,5 +519,5 @@ class Geom():
|
|||
for i, oldID in enumerate(np.unique(self.microstructure)):
|
||||
renumbered = np.where(self.microstructure == oldID, i+1, renumbered)
|
||||
|
||||
return self.update(renumbered))
|
||||
return self.update(renumbered)
|
||||
#self.add_comments('tbd')
|
||||
|
|
Loading…
Reference in New Issue