Skip to content

Commit

Permalink
Update Axis to remove createSpectraAxis method. Refs #6639
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Mar 11, 2013
1 parent cc4cbb5 commit 556d95d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,11 @@ void export_NumericAxis()

}

/**
* Creates a SpectraAxis
* @param length The length of the new axis
* @return pointer to the axis object
*/
Axis* createSpectraAxis(int length)
{
return new Mantid::API::SpectraAxis(length);
}

void export_SpectraAxis()
{
class_< SpectraAxis, bases<Axis>, boost::noncopyable >("SpectraAxis", no_init)
.def("spectraNo", (const specid_t &(SpectraAxis::*)(const size_t &) const)&SpectraAxis::spectraNo,
return_value_policy<copy_const_reference>(), "Returns the spectrum no at the given index")
.def("create", &createSpectraAxis, return_internal_reference<>(), "Creates a new SpectraAxis of a specified length")
.staticmethod("create")
;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from testhelpers import run_algorithm
from mantid.api import NumericAxis, SpectraAxis, TextAxis
from mantid.api import NumericAxis, TextAxis
import numpy as np

class AxisTest(unittest.TestCase):
Expand All @@ -14,7 +14,6 @@ def setUp(self):

def test_constructor_methods_return_the_correct_type(self):
self.assertTrue(isinstance(NumericAxis.create(2),NumericAxis))
self.assertTrue(isinstance(SpectraAxis.create(2),SpectraAxis))
self.assertTrue(isinstance(TextAxis.create(2),TextAxis))

def test_axis_meta_data(self):
Expand Down

0 comments on commit 556d95d

Please sign in to comment.