diff --git a/Framework/PythonInterface/mantid/plots/functions.py b/Framework/PythonInterface/mantid/plots/functions.py index b6003efb8eca82bb4a086aa13b745b18254ac60a..2f537a5c4efb166630e8ee7ab4cb5aa21aae3b8a 100644 --- a/Framework/PythonInterface/mantid/plots/functions.py +++ b/Framework/PythonInterface/mantid/plots/functions.py @@ -183,7 +183,7 @@ def _getMatrix2DData(workspace, distribution,histogram2D=False): else: if histogram2D: if _commonX(x): - x=numpy.broadcast_to(numpy.expand_dims(boundaries_from_points(x[0]),0),(z.shape[0]+1,z.shape[1]+1)) + x=numpy.tile(boundaries_from_points(x[0]),z.shape[0]+1).reshape(z.shape[0]+1,-1) else: x = numpy.vstack((x,x[-1])) x = numpy.array([boundaries_from_points(xi) for xi in x]) @@ -192,7 +192,7 @@ def _getMatrix2DData(workspace, distribution,histogram2D=False): else: if len(y)==z.shape[0]+1: y=points_from_boundaries(y) - y = numpy.broadcast_to(numpy.expand_dims(y,1),x.shape) + y = numpy.tile(y,x.shape[1]).reshape(x.shape[1],x.shape[0]).transpose() return (x,y,z) diff --git a/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py b/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py index 47b85ea6e708b8efe30f49f927d6f61f51c092ca..6f2f7261f0052c713523c3ef38b0077811ac2e8e 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py +++ b/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py @@ -33,7 +33,7 @@ class Plots__init__Test(unittest.TestCase): def test_fail(self): fig, ax = plt.subplots() - self.assertRaises(AttributeError,ax.plot,self.ws2d_histo,'rs',specNum=1) + self.assertRaises(Exception,ax.plot,self.ws2d_histo,'rs',specNum=1) self.assertRaises(ValueError,ax.pcolormesh,self.ws2d_histo) if __name__ == '__main__': diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt deleted file mode 100644 index ed97d539c095cf1413af30cc23dea272095b97dd..0000000000000000000000000000000000000000 --- a/Testing/Temporary/CTestCostData.txt +++ /dev/null @@ -1 +0,0 @@ ----