\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Workspace | Input | Workspace | Mandatory | Name of the workspace to delete. |
If the input workspace exists then it is removed from Mantid.
Example - Delete using a handle
# A small test workspace, with sample_ws as the handle
sample_ws = CreateSingleValuedWorkspace(5.0)
DeleteWorkspace(sample_ws)
print("sample_ws exists in mantid: {}".format("sample_ws" in mtd))
Output:
sample_ws exists in mantid: False
Example - Delete using a string
# A small test workspace, with sample_ws as the handle
CreateSingleValuedWorkspace(5.0, OutputWorkspace="single_value")
DeleteWorkspace("single_value")
print("single_value exists in mantid: {}".format("single_value" in mtd))
Output:
single_value exists in mantid: False
Categories: AlgorithmIndex | Utility\Workspaces