示例#1
0
    def test_with_field(self):
        root = self._file.root()

        f = root.create_field("test_scalar","float64")
        self.assertEqual(get_rank(f),1)

        f = root.create_field("test_multidim","int16",shape=(1024,2048))
        self.assertEqual(get_rank(f),2)
示例#2
0
    def test_with_attribute(self):
        #this should work as the file does not exist yet
        root = self._file.root()

        a = root.attributes.create("test_scalar","float32")
        self.assertEqual(get_rank(a),1)

        a = root.attributes.create("test_multidim","ui64",shape=(3,4))
        self.assertEqual(get_rank(a),2)