示例#1
0
 def testListofStrings2(self):
     column = [['Hello', 'World'], 'World']
     result = FMFLoader.column2FieldContainer('simple string', column)
     expectedResult = FieldContainer(
         numpy.array(['Hello, World', 'World']), longname='simple string'
         )
     assertEqual(result, expectedResult)
示例#2
0
 def testVariableFirstNaN(self):
     column = [
         ('T', 'NaN', Quantity('0.5 degC')),
         ('T', Quantity('11.2 degC'), None)
         ]
     result = FMFLoader.column2FieldContainer('temperature', column)
     expectedResult = FieldContainer(
         numpy.array([numpy.NaN, 11.2]), error=numpy.array([0.5, 0.0]),
         mask = numpy.array([True, False]),
         unit='1 degC', longname='temperature', shortname='T')
     assertEqual(result, expectedResult)