Skip to content
Snippets Groups Projects
Commit f41a7fc6 authored by mantid-builder's avatar mantid-builder Committed by Bhuvan Bezawada
Browse files

clang-format PR22644 579154e9

parent 579154e9
No related merge requests found
...@@ -61,7 +61,6 @@ struct PropertyWithValueExporter { ...@@ -61,7 +61,6 @@ struct PropertyWithValueExporter {
.def("dtype", &dtype<HeldType>, arg("self"), "returns :`std::string`"); .def("dtype", &dtype<HeldType>, arg("self"), "returns :`std::string`");
} }
}; };
} }
} }
......
...@@ -25,12 +25,11 @@ using namespace boost::python; ...@@ -25,12 +25,11 @@ using namespace boost::python;
namespace { namespace {
/// return_value_policy for cloned numpy array /// return_value_policy for cloned numpy array
using return_cloned_numpy = using return_cloned_numpy =
return_value_policy<Policies::VectorRefToNumpy<Converters::Clone>>; return_value_policy<Policies::VectorRefToNumpy<Converters::Clone>>;
// Call the dtype helper function // Call the dtype helper function
template <typename type> template <typename type> std::string dtype(ArrayProperty<type> &self) {
std::string dtype(ArrayProperty<type> &self) {
return dtypeHelper::dtype(self); return dtypeHelper::dtype(self);
} }
...@@ -107,7 +106,7 @@ ArrayProperty<T> *createArrayPropertyFromNDArray(const std::string &name, ...@@ -107,7 +106,7 @@ ArrayProperty<T> *createArrayPropertyFromNDArray(const std::string &name,
void export_ArrayProperty() { void export_ArrayProperty() {
// Match the python names to their C types // Match the python names to their C types
EXPORT_ARRAY_PROP(double, Float); EXPORT_ARRAY_PROP(double, Float);
EXPORT_ARRAY_PROP(long, Int); EXPORT_ARRAY_PROP(long, Int);
EXPORT_ARRAY_PROP(std::string, String); EXPORT_ARRAY_PROP(std::string, String);
......
...@@ -37,8 +37,7 @@ void addPyTimeValue(TimeSeriesProperty<TYPE> &self, ...@@ -37,8 +37,7 @@ void addPyTimeValue(TimeSeriesProperty<TYPE> &self,
} }
// Call the dtype helper function // Call the dtype helper function
template <typename TYPE> template <typename TYPE> std::string dtype(TimeSeriesProperty<TYPE> &self) {
std::string dtype(TimeSeriesProperty<TYPE> &self) {
return dtypeHelper::dtype(self); return dtypeHelper::dtype(self);
} }
...@@ -50,24 +49,22 @@ std::string dtype(TimeSeriesProperty<TYPE> &self) { ...@@ -50,24 +49,22 @@ std::string dtype(TimeSeriesProperty<TYPE> &self) {
#Prefix "TimeSeriesProperty", \ #Prefix "TimeSeriesProperty", \
init<const std::string &>((arg("self"), arg("value")))) \ init<const std::string &>((arg("self"), arg("value")))) \
.add_property( \ .add_property( \
"value", \ "value", \
make_function( \ make_function( \
&Mantid::Kernel::TimeSeriesProperty<TYPE>::valuesAsVector, \ &Mantid::Kernel::TimeSeriesProperty<TYPE>::valuesAsVector, \
return_value_policy<VectorToNumpy>())) \ return_value_policy<VectorToNumpy>())) \
.add_property( \ .add_property( \
"times", \ "times", \
make_function( \ make_function( \
&Mantid::Kernel::TimeSeriesProperty<TYPE>::timesAsVector, \ &Mantid::Kernel::TimeSeriesProperty<TYPE>::timesAsVector, \
return_value_policy<VectorToNumpy>())) \ return_value_policy<VectorToNumpy>())) \
.def("addValue", \ .def("addValue", (void (TimeSeriesProperty<TYPE>::*)( \
(void (TimeSeriesProperty<TYPE>::*)(const DateAndTime &, \ const DateAndTime &, const TYPE)) & \
const TYPE)) & \ TimeSeriesProperty<TYPE>::addValue, \
TimeSeriesProperty<TYPE>::addValue, \
(arg("self"), arg("time"), arg("value"))) \ (arg("self"), arg("time"), arg("value"))) \
.def("addValue", \ .def("addValue", (void (TimeSeriesProperty<TYPE>::*)( \
(void (TimeSeriesProperty<TYPE>::*)(const std::string &, \ const std::string &, const TYPE)) & \
const TYPE)) & \ TimeSeriesProperty<TYPE>::addValue, \
TimeSeriesProperty<TYPE>::addValue, \
(arg("self"), arg("time"), arg("value"))) \ (arg("self"), arg("time"), arg("value"))) \
.def("addValue", &addPyTimeValue<TYPE>, \ .def("addValue", &addPyTimeValue<TYPE>, \
(arg("self"), arg("time"), arg("value"))) \ (arg("self"), arg("time"), arg("value"))) \
...@@ -94,7 +91,6 @@ std::string dtype(TimeSeriesProperty<TYPE> &self) { ...@@ -94,7 +91,6 @@ std::string dtype(TimeSeriesProperty<TYPE> &self) {
} // namespace } // namespace
void export_TimeSeriesProperty_Double() { void export_TimeSeriesProperty_Double() {
EXPORT_TIMESERIES_PROP(double, Float); EXPORT_TIMESERIES_PROP(double, Float);
} }
...@@ -124,8 +120,8 @@ void export_TimeSeriesPropertyStatistics() { ...@@ -124,8 +120,8 @@ void export_TimeSeriesPropertyStatistics() {
.add_property("median", .add_property("median",
&Mantid::Kernel::TimeSeriesPropertyStatistics::median) &Mantid::Kernel::TimeSeriesPropertyStatistics::median)
.add_property( .add_property(
"standard_deviation", "standard_deviation",
&Mantid::Kernel::TimeSeriesPropertyStatistics::standard_deviation) &Mantid::Kernel::TimeSeriesPropertyStatistics::standard_deviation)
.add_property("duration", .add_property("duration",
&Mantid::Kernel::TimeSeriesPropertyStatistics::duration); &Mantid::Kernel::TimeSeriesPropertyStatistics::duration);
} }
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