예제 #1
0
 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)
예제 #2
0
 def test_name(self):
     print('TestSimpleArray: name')
     arr, rs = self.createNumpy('float32')
     a = SimpleArray(arr, rs)
     a.setName("myname")
     self.assertEqual("myname", a.name())