def test_dynamicTypeChange(self): print('TestSimpleArray: dynamicTypeChange') arr, rs = self.createNumpy('int32') name = "lala" a = SimpleArray(dtype='float32', name=name) fnames = ["a", "b", "c", "d", "e", "f"] a.setFeatureNames(fnames) a.createFromNumpy(arr, rs) self.assertTrue(a.featureNames() == fnames) self.assertTrue(a.name() == name)
def test_name(self): print('TestSimpleArray: name') arr, rs = self.createNumpy('float32') a = SimpleArray(arr, rs) a.setName("myname") self.assertEqual("myname", a.name())