diff --git a/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h b/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h index f28cb82152330306db9044da42922b1e994284c0..dc429e1a15fae9d8476cc47d8cde72da03288f75 100644 --- a/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h +++ b/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h @@ -137,7 +137,7 @@ template <typename WorkspaceType> struct WorkspacePropertyExporter { .def("__init__", make_constructor( &createPropertyWithValidator, default_call_policies(), - args("name", "defaultValue", "direction", "validator"))) + (arg("name"), arg("defaultValue"), arg("direction"), arg("validator")))) .def("__init__", make_constructor(&createPropertyWithOptionalFlag, default_call_policies(), @@ -149,6 +149,7 @@ template <typename WorkspaceType> struct WorkspacePropertyExporter { args("name", "defaultValue", "direction", "optional", "locking", "validator"))) .def("isOptional", &TypedWorkspaceProperty::isOptional, + arg("self"), "Returns true if the property has been marked as optional") .add_property("value", &value); diff --git a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h index 5de200f77772535379d80f49cc8303345a0d4aba..83663e18f0cc56e89c25a09e6ee3b314a0174e46 100644 --- a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h +++ b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h @@ -66,30 +66,44 @@ template <typename SvcType, typename SvcPtrType> struct DataServiceExporter { auto classType = PythonType(pythonClassName, no_init) .def("add", &DataServiceExporter::addItem, + (arg("self"), arg("name"), arg("item")), "Adds the given object to the service with the given name. If " "the name/object exists it will raise an error.") .def("addOrReplace", &DataServiceExporter::addOrReplaceItem, + (arg("self"), arg("name"), arg("item")), "Adds the given object to the service with the given name. " "The the name exists the object is replaced.") .def("doesExist", &SvcType::doesExist, + (arg("self"), arg("name")), "Returns True if the object is found in the service.") .def("retrieve", &DataServiceExporter::retrieveOrKeyError, + (arg("self"), arg("name")), "Retrieve the named object. Raises an exception if the name " "does not exist") - .def("remove", &SvcType::remove, "Remove a named object") + .def("remove", &SvcType::remove, + (arg("self"), arg("name")), + "Remove a named object") .def("clear", &SvcType::clear, + arg("self"), "Removes all objects managed by the service.") .def("size", &SvcType::size, + arg("self"), "Returns the number of objects within the service") .def("getObjectNames", &DataServiceExporter::getObjectNamesAsList, + arg("self"), "Return the list of names currently known to the ADS") // Make it act like a dictionary - .def("__len__", &SvcType::size) - .def("__getitem__", &DataServiceExporter::retrieveOrKeyError) - .def("__setitem__", &DataServiceExporter::addOrReplaceItem) - .def("__contains__", &SvcType::doesExist) - .def("__delitem__", &SvcType::remove); + .def("__len__", &SvcType::size, + arg("self")) + .def("__getitem__", &DataServiceExporter::retrieveOrKeyError, + (arg("self"), arg("name"))) + .def("__setitem__", &DataServiceExporter::addOrReplaceItem, + (arg("self"), arg("name"), arg("item"))) + .def("__contains__", &SvcType::doesExist, + arg("self")) + .def("__delitem__", &SvcType::remove, + (arg("self"), arg("name"))); return classType; } diff --git a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h index e876486b65ce12d54ea8a1a57c5e651db2a7a722..95e603d531931f65178711fa946c17e3c00a2e2b 100644 --- a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h +++ b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h @@ -40,6 +40,7 @@ template <typename Type> struct TypedValidatorExporter { class_<TypedValidator<Type>, bases<IValidator>, boost::noncopyable>( pythonClassName, no_init) .def("isValid", &IValidator::isValid<Type>, + (arg("self"), arg("value")), "Returns an empty string if the value is considered valid, " "otherwise a string defining the error is returned."); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp index 2ebe6a155f32551d63f997e5e66f187e21d9fdc9..1c0e9db570db8d89d5ecb57cf522ef3966abd26d 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp @@ -78,8 +78,8 @@ void export_leaf_classes() { "Initialize the algorithm from a string representation") .staticmethod("fromString") .def("createChildAlgorithm", &Algorithm::createChildAlgorithm, - (arg("name"), arg("startProgress") = -1.0, arg("endProgress") = -1.0, - arg("enableLogging") = true, arg("version") = -1), + (arg("self"), arg("name"), arg("startProgress"), arg("endProgress"), + arg("enableLogging"), arg("version")), "Creates and intializes a named child algorithm. Output workspaces " "are given a dummy name.") .def("declareProperty", @@ -87,7 +87,7 @@ void export_leaf_classes() { declarePropertyType1_Overload( (arg("self"), arg("prop"), arg("doc") = ""))) .def("enableHistoryRecordingForChild", - &Algorithm::enableHistoryRecordingForChild, (args("on")), + &Algorithm::enableHistoryRecordingForChild, (arg("self"), arg("on")), "Turns history recording on or off for an algorithm.") .def("declareProperty", (declarePropertyType2)&PythonAlgorithm::declarePyAlgProperty, diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp index 2c1705e25f19b0fd65b9c4876f13b0b83d6d1128..a185fc4b0171d4477354a1a5da01a474aa9eb199 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp @@ -90,9 +90,10 @@ void export_Axis() { arg("self"), return_value_policy<copy_const_reference>(), "Returns the unit object for the axis") .def("getValue", &Axis::getValue, - Axis_getValue(args("index", "vertical_index"), - "Returns the value at the given point on the Axis. " - "The vertical axis index [default=0]")) + Axis_getValue( + (arg("self"), arg("index"), arg("vertical_index")), + "Returns the value at the given point on the Axis. " + "The vertical axis index [default=0]")) .def("extractValues", &extractAxisValues, arg("self"), "Return a numpy array of the axis values") .def("setUnit", &Axis::setUnit, (arg("self"), arg("unit_name")), @@ -126,7 +127,9 @@ void export_NumericAxis() { /// Exported so that Boost.Python can give back a NumericAxis class when an /// Axis* is returned class_<NumericAxis, bases<Axis>, boost::noncopyable>("NumericAxis", no_init) - .def("create", &createNumericAxis, return_internal_reference<>(), + .def("create", &createNumericAxis, + arg("length"), + return_internal_reference<>(), "Creates a new NumericAxis of a specified length") .staticmethod("create"); } @@ -149,7 +152,9 @@ void export_BinEdgeAxis() { /// Axis* is returned class_<BinEdgeAxis, bases<NumericAxis>, boost::noncopyable>("BinEdgeAxis", no_init) - .def("create", &createBinEdgeAxis, return_internal_reference<>(), + .def("create", &createBinEdgeAxis, + arg("length"), + return_internal_reference<>(), "Creates a new BinEdgeAxis of a specified length") .staticmethod("create"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp index 2f9350e4ae752556ffa9acd0ecc34c15bb487503..782feec2f82c753697964c97b5e8f6f8242f48e3 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp @@ -70,6 +70,7 @@ void export_DataProcessorAlgorithm() { .def("getProcessProperties", &DataProcessorAdapter::getProcessPropertiesProxy, + (arg("self"), arg("property_manager")), "Returns the named property manager from the service or creates " "a new one if it does not exist") diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp index f762919cdf1a63339a14da24330e4208426b954c..c80cd1af888b9460bd8859f157e9b61f150c0876 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp @@ -15,11 +15,12 @@ void export_FileFinder() { class_<FileFinderImpl, boost::noncopyable>("FileFinderImpl", no_init) .def("getFullPath", &FileFinderImpl::getFullPath, getFullPathOverloader( - (arg("path"), arg("ignoreDirs") = false), + (arg("self"), arg("path"), arg("ignoreDirs") = false), "Return a full path to the given file if it can be found within " "datasearch.directories paths. Directories can be ignored with " "ignoreDirs=True. An empty string is returned otherwise.")) .def("findRuns", &FileFinderImpl::findRuns, + (arg("self"), arg("hintstr")), "Find a list of files file given a hint. " "The hint can be a comma separated list of run numbers and can also " "include ranges of runs, e.g. 123-135 or equivalently 123-35" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp index 5935cb7aae9932ac57f2f9c6f8ce18203e867f2d..baa9c3e8a188627728b20dfa745d7dd2cdfbaee7 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp @@ -10,9 +10,10 @@ void export_FileLoaderRegistry() { class_<FileLoaderRegistryImpl, boost::noncopyable>("FileLoaderRegistryImpl", no_init) .def("canLoad", &FileLoaderRegistryImpl::canLoad, + (arg("self"), arg("algorithm_name"), arg("file_name")), "Perform a check that that the given algorithm can load the file") .def("Instance", &FileLoaderRegistry::Instance, return_value_policy<reference_existing_object>(), "Returns a reference to the FileLoaderRegistry singleton instance") .staticmethod("Instance"); -} \ No newline at end of file +} diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp index 2bf8059cae0bf385cb1a9b69cbd912184e4c57c5..2c775d7d4b1cddf8b2a1c506893dc850aa7fb412 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp @@ -400,10 +400,12 @@ void export_ialgorithm() { arg("self"), "Runs the algorithm and returns whether it has been successful") // 'Private' static methods - .def("_algorithmInThread", &_algorithmInThread) + .def("_algorithmInThread", &_algorithmInThread, + arg("thread_id")) .staticmethod("_algorithmInThread") // Special methods - .def("__str__", &IAlgorithm::toString) + .def("__str__", &IAlgorithm::toString, + arg("self")) // deprecated methods .def("getOptionalMessage", &getOptionalMessage, diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp index f755085d7feac30823bdda1cb30b9f01e38c8a6b..9c7f5b920b407127abaf8a39478a567dc8f708ba 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp @@ -93,10 +93,14 @@ void export_IFunction() { (arg("self"), arg("name")), "Get the value of the named parameter") .def("setParameter", (setParameterType1)&IFunction::setParameter, - setParameterType1_Overloads("Sets the value of the ith parameter")) + setParameterType1_Overloads( + (arg("self"), arg("i"), arg("value"), arg("explicitlySet")), + "Sets the value of the ith parameter")) .def("setParameter", (setParameterType2)&IFunction::setParameter, - setParameterType2_Overloads("Sets the value of the named parameter")) + setParameterType2_Overloads( + (arg("self"), arg("name"), arg("value"), arg("explicitlySet")), + "Sets the value of the named parameter")) .def("declareAttribute", &IFunctionAdapter::declareAttribute, (arg("self"), arg("name"), arg("default_value")), diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp index b610b945ffb3ccb664e1fd82870631607349008c..a435fc7b192eadaad8060c02817d251d5bd2cf59 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp @@ -18,6 +18,7 @@ void export_IFunction1D() { .def("function1D", (object (IFunction1DAdapter::*)(const object &) const) & IFunction1DAdapter::function1D, + (arg("self"), arg("xvals")), "Calculate the values of the function for the given x values and " "returns them"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp index 5ed3e256452c4064c387b2dc7a9b565bab4cc377..f64840efaf7bd9f7a3266ade3d528054fdb18aa4 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp @@ -197,7 +197,8 @@ void export_IMDHistoWorkspace() { (arg("self"), arg("index"), arg("value")), "Sets the squared-error at the specified index.") - .def("setSignalArray", &setSignalArray, arg("self"), + .def("setSignalArray", &setSignalArray, + (arg("self"), arg("signalValues")), "Sets the signal from a numpy array. The sizes must match the " "current workspace sizes. A ValueError is thrown if not") diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp index 66affb607c0e136f9da7bbfb99b7d421020880b1..cacc585f9548871905e22857dc23c106b5c2a479 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp @@ -29,11 +29,14 @@ bool isMaskedFromList(const IMaskWorkspace &self, void export_IMaskWorkspace() { class_<IMaskWorkspace, boost::noncopyable>("IMaskWorkspace", no_init) .def("getNumberMasked", &IMaskWorkspace::getNumberMasked, + arg("self"), "Returns the number of masked pixels in the workspace") .def("isMasked", (bool (IMaskWorkspace::*)(const Mantid::detid_t) const) & IMaskWorkspace::isMasked, + (arg("self"), arg("detector_id")), "Returns whether the given detector ID is masked") .def("isMasked", isMaskedFromList, + (arg("self"), arg("detector_id_list")), "Returns whether all of the given detector ID list are masked"); // register pointers diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp index 3dcc380b56de3f45d08f8d1d833cccbcbc67eabe..6f2d447f7e6ebdffb6c42de9bbe0784dbc415921 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp @@ -125,8 +125,10 @@ void export_IPeak() { (arg("self"), arg("sigma_intensity")), "Set the error on the integrated peak intensity") .def("getBinCount", &IPeak::getBinCount, + arg("self"), "Return the # of counts in the bin at its peak") - .def("setBinCount", &IPeak::setBinCount, (arg("self"), arg("bin_count")), + .def("setBinCount", &IPeak::setBinCount, + (arg("self"), arg("bin_count")), "Set the # of counts in the bin at its peak") .def("getRow", &IPeak::getRow, arg("self"), "For RectangularDetectors only, returns " diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp index 55585283456e84176d06a1bc53b33b0f37a287a1..7471b0b121b6b584a4884ef8b16c08adaec3e12d 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp @@ -11,6 +11,7 @@ void export_ISplittersWorkspace() { class_<ISplittersWorkspace, boost::noncopyable>("ISplittersWorkspace", no_init) .def("getNumberSplitters", &ISplittersWorkspace::getNumberSplitters, + arg("self"), "Returns the number of splitters within the workspace"); // register pointers diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp index 732cae6fca5c6feaec3b64c6d969d5ffbaa4067f..31bb8859817904f3d16e3d8646dce0d72f20513e 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp @@ -9,11 +9,11 @@ void export_Jacobian() { register_ptr_to_python<Jacobian *>(); class_<Jacobian, boost::noncopyable>("Jacobian", no_init) - .def("set", &Jacobian::set, (arg("iy"), arg("ip"), arg("value")), + .def("set", &Jacobian::set, (arg("self"), arg("iy"), arg("ip"), arg("value")), "Set an element of the Jacobian matrix where iy=index of data " "point, ip=index of parameter.") - .def("get", &Jacobian::get, (arg("iy"), arg("ip")), + .def("get", &Jacobian::get, (arg("self"), arg("iy"), arg("ip")), "Return the given element of the Jacobian matrix where iy=index of " "data point, ip=index of parameter."); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp index fe588b2413c841620fb3e83712b3a3be675b1145..b695c41e3e45b14a674b782752d5eb4c76b6f8d9 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp @@ -172,7 +172,8 @@ void export_MatrixWorkspace() { (arg("self"), arg("workspaceIndex")), return_internal_reference<>(), "Return the spectra at the given workspace index.") .def("getIndexFromSpectrumNumber", - &MatrixWorkspace::getIndexFromSpectrumNumber, arg("self"), + &MatrixWorkspace::getIndexFromSpectrumNumber, + (arg("self"), arg("spec_no")), "Returns workspace index correspondent to the given spectrum " "number. Throws if no such spectrum is present in the workspace") .def("getDetector", &MatrixWorkspace::getDetector, diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp index e1ee933671887581dcfb37ed06065f2045ba4643..5ebb9d41783003e42b43b0abec9873f9e9f6d391 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp @@ -12,8 +12,10 @@ void export_MultipleExperimentInfos() { .def("getExperimentInfo", (ExperimentInfo_sptr (MultipleExperimentInfos::*)(const uint16_t)) & MultipleExperimentInfos::getExperimentInfo, + (arg("self"), arg("run_index")), "Return the experiment info at the given index.") .def("getNumExperimentInfo", &MultipleExperimentInfos::getNumExperimentInfo, + arg("self"), "Return the number of experiment info objects,"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp index e99ea1c92c6e0d9dc08f4d259d303021f0a32479..6f57b9aab6b45c4246c47c525953c861c329a5fc 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp @@ -182,10 +182,13 @@ void export_Run() { "Returns the value pointed to by the key or the default value given") .def("keys", &keys, arg("self"), "Returns the names of the properties as list") - .def("__contains__", &Run::hasProperty) + .def("__contains__", &Run::hasProperty, + (arg("self"), arg("name"))) .def("__getitem__", &Run::getProperty, + (arg("self"), arg("name")), return_value_policy<return_by_value>()) - .def("__setitem__", &addOrReplaceProperty) + .def("__setitem__", &addOrReplaceProperty, + (arg("self"), arg("name"), arg("value"))) ; } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp index 0f572e8bf639040dd0f7d8e74c9347f270ee083d..91eef3e80418280995943a92161a2537dded62a9 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp @@ -19,6 +19,7 @@ void export_ScriptRepositoryFactory() { class_<ScriptRepositoryFactoryImpl, boost::noncopyable>( "ScriptRepositoryFactory", no_init) .def("create", &ScriptRepositoryFactoryImpl::create, + (arg("self"), arg("class_name")), "Return a pointer to the ScriptRepository object") .def("Instance", &ScriptRepositoryFactory::Instance, return_value_policy<reference_existing_object>(), diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp index 79ad1d6ba6c907df9bc171ee771fe58c64245890..a926f6057b5a526137da1c454eeef479f4817620 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp @@ -34,9 +34,11 @@ void export_Workspace() { .def("setComment", &Workspace::setComment, (arg("self"), arg("comment")), "Set the comment field of the workspace") .def("isDirty", &Workspace::isDirty, - Workspace_isDirtyOverloads(arg("n"), "True if the workspace has run " - "more than n algorithms " - "(Default=1)")) + Workspace_isDirtyOverloads( + (arg("self"), arg("n")), + "True if the workspace has run " + "more than n algorithms " + "(Default=1)")) .def("getMemorySize", &Workspace::getMemorySize, arg("self"), "Returns the memory footprint of the workspace in KB") .def("getHistory", (const WorkspaceHistory &(Workspace::*)() const) & diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp index b77d3cc8a152a36926b9619fbb7cd84fd177162c..ad9a9207e811909433660e5083c3a0d25a7d82c7 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp @@ -63,21 +63,21 @@ void export_WorkspaceFactory() { no_init) .def("create", &createFromParentPtr, createFromParent_Overload( - createFromParentDoc, (arg("parent"), arg("NVectors") = -1, + createFromParentDoc, (arg("self"), arg("parent"), arg("NVectors") = -1, arg("XLength") = -1, arg("YLength") = -1))) .def("create", (createFromScratchPtr)&WorkspaceFactoryImpl::create, createFromScratchDoc, return_value_policy<AsType<Workspace_sptr>>(), - (arg("className"), arg("NVectors"), arg("XLength"), arg("YLength"))) + (arg("self"), arg("className"), arg("NVectors"), arg("XLength"), arg("YLength"))) .def("createTable", &WorkspaceFactoryImpl::createTable, createTable_Overload("Creates an empty TableWorkspace", - (arg("className") = "TableWorkspace")) + (arg("self"), arg("className") = "TableWorkspace")) [return_value_policy<AsType<Workspace_sptr>>()]) .def("createPeaks", &WorkspaceFactoryImpl::createPeaks, createPeaks_Overload("Creates an empty PeaksWorkspace", - (arg("className") = "PeaksWorkspace")) + (arg("self"), arg("className") = "PeaksWorkspace")) [return_value_policy<AsType<Workspace_sptr>>()]) .def("Instance", &WorkspaceFactory::Instance,