diff --git a/Framework/Kernel/inc/MantidKernel/ContainerDtype.h b/Framework/Kernel/inc/MantidKernel/ContainerDtype.h index a9181e88f4a4ec5ad0f0dadbc37ac83a54c9027d..49550391b9e8d2736e19a362381f73bc3e76a088 100644 --- a/Framework/Kernel/inc/MantidKernel/ContainerDtype.h +++ b/Framework/Kernel/inc/MantidKernel/ContainerDtype.h @@ -47,13 +47,9 @@ namespace dtypeHelper { // Free function to determine data type being stored in container template <template <class> class Container, typename HeldType> -std::string dtype(Container<HeldType>) { +std::string dtype(const Container<HeldType>) { if (std::is_same<HeldType, bool>::value) { return "b"; - } else if (std::is_same<HeldType, std::int32_t>::value) { - return "int32"; - } else if (std::is_same<HeldType, std::int64_t>::value) { - return "int64"; } else if (std::is_integral<HeldType>::value) { return "i"; } else if (std::is_same<HeldType, std::float_t>::value) { diff --git a/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h b/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h index 1f39d3d73a937a23b28dc59a6091d6c7f4b5022e..90a6b80163689f2ea5ab34d3b8f3345a48ff8133 100644 --- a/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h +++ b/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h @@ -120,6 +120,9 @@ class DLLExport TimeSeriesProperty : public Property, public: /// Constructor explicit TimeSeriesProperty(const std::string &name); + + TimeSeriesProperty(const std::string &name, TimeSeriesProperty<TYPE> &type); + /// Virtual destructor ~TimeSeriesProperty() override; /// "Virtual" copy constructor diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py index bd2da0e12bbbb6a64c24f3d574779c971fe352e0..b1639f72f18b05e4ce3ff61827cc8418c798b703 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py @@ -129,7 +129,7 @@ class ArrayPropertyTest(unittest.TestCase): FloatArrayProperty("Input", Direction.Input), "Float array") def PyExec(self): self._input_values = self.getProperty("Input").value - + input_values = range(1, 5) self._do_algorithm_test(AlgWithFloatArrayProperty, input_values) @@ -144,7 +144,7 @@ class ArrayPropertyTest(unittest.TestCase): # Create float array float_input_values = [1.1, 2.5, 5.6, 4.6, 9.0, 6.0] float_arr = FloatArrayProperty("floats", float_input_values, validator, direc) - + # Create int array int_input_values = [1, 2, 5, 4, 9, 6] int_arr = IntArrayProperty("integers", int_input_values, validator, direc) @@ -152,7 +152,7 @@ class ArrayPropertyTest(unittest.TestCase): # Create string array str_input_values =["a", "b", "c", "d", "e"] str_arr = StringArrayProperty("letters", str_input_values, validator, direc) - + # Test self.assertEquals(float_arr.dtype(), "d") self.assertEquals(int_arr.dtype(), "i") diff --git a/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py b/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py index b0d2411eef3ea78d31ee4f0c2645715a118eafa3..ecab49de0d4f581e60f363e66e929eda7929c424 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py @@ -126,9 +126,9 @@ class PropertyWithValueTest(unittest.TestCase): result = det_list_prop.valueAsPrettyStr(40,False) self.assertEquals(result.startswith("1,2,3,"), True) self.assertEquals(result.endswith("98,99"), True) - + # Check the dtype return value - self.assertEquals(det_list_prop.dtype(), "int32") + self.assertEquals(det_list_prop.dtype(), "i") def _do_vector_double_numpy_test(self, int_type=False): create_ws = AlgorithmManager.createUnmanaged('CreateWorkspace') diff --git a/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py index 6da8d40c7944bd9318779eb5529d00f77310da4e..5017ae8da86745599454b9557d25e500cf47986f 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py @@ -69,7 +69,7 @@ class TimeSeriesPropertyTest(unittest.TestCase): self.assertEquals(log_series.size(), self._nframes) self.assertEquals(log_series.nthValue(1), 1436) # Check the dtype return value - self.assertEquals(log_series.dtype(), "int64") + self.assertEquals(log_series.dtype(), "i") def test_time_series_string_can_be_extracted(self): log_series = self._test_ws.getRun()["icp_event"]