Skip to content
Snippets Groups Projects
Commit c6aa348f authored by Joseph Ramsay's avatar Joseph Ramsay
Browse files

Re #20830 Fixed float format problems

parent ace88294
No related branches found
No related tags found
No related merge requests found
......@@ -51,11 +51,12 @@ Output:
.. testoutput:: ExSelectCellOfType
Lattice before SelectCellOfType:
8.60581864273 11.935925461 11.9418127661 107.429088323 98.7529124665 98.9511934747
Lattice before SelectCellOfType:
8.605818643 11.935925461 11.941812766 107.429088323 98.752912466 98.951193475
Lattice after SelectCellOfType:
14.131051152 19.247332564 8.605818643 89.881170675 105.071333770 89.970386662
Lattice after SelectCellOfType:
14.1310511523 19.247332564 8.60581864273 89.8811706749 105.07133377 89.970386662
.. categories::
......
......@@ -51,11 +51,11 @@ Output:
.. testoutput:: ExSelectCellWithForm
Lattice before SelectCellWithForm:
8.60581864273 11.935925461 11.9418127661 107.429088323 98.7529124665 98.9511934747
Lattice before SelectCellWithForm:
8.605818643 11.935925461 11.941812766 107.429088323 98.752912466 98.951193475
Lattice after SelectCellWithForm:
14.1310511523 19.247332564 8.60581864273 89.8811706749 105.07133377 89.970386662
Lattice after SelectCellWithForm:
14.131051152 19.247332564 8.605818643 89.881170675 105.071333770 89.970386662
.. categories::
......
......@@ -30,11 +30,11 @@ Usage
def outputMDDimensions(ws):
num_dims = ws.getNumDims()
print "Name Bins Min Max"
print("Name Bins Min Max")
for dim_index in range(num_dims):
dim = ws.getDimension(dim_index)
print "%s %i %.2f %.2f" % (dim.name,
dim.getNBins(), dim.getMinimum(), dim.getMaximum())
print("{} {} {:.2f} {:.2f}".format(
dim.name, dim.getNBins(), dim.getMinimum(), dim.getMaximum()))
#create a test MD event workspace
mdew = CreateMDWorkspace(Dimensions=3, Extents=[-1,1,-5,5,-9,10],
......@@ -46,13 +46,13 @@ Usage
AlignedDim1='B,-5,5,5',
AlignedDim2='C,-9,10,9')
print "The original workspace"
print("The original workspace")
outputMDDimensions(wsHisto)
#The values in start and end are the Bin numbers(staring at 0) of the dimensions
wsOut = SliceMDHisto(wsHisto,Start=[1,2,0],End=[7,4,7])
print "\nAfter Slicing"
print("\nAfter Slicing")
outputMDDimensions(wsOut)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment