31 lines
580 B
Python
31 lines
580 B
Python
|
|
data2d = [ [1.0, 2.0, 3.0, 4.0, 5.0], [2.0, 3.0, 4.0, 5.0, 6.0, ], [3.0, 4.0, 5.0, 6.0, 7.0]]
|
|
|
|
#Creating a 2D data FLOAT dataset adding lines one by one
|
|
path = "group/data1"
|
|
create_dataset(path, 'd', False, (0,0))
|
|
for row in data2d:
|
|
append_dataset(path, row)
|
|
|
|
|
|
#Creating a Table (compund type)
|
|
path = "group/data2"
|
|
names = ["a", "b", "c",]
|
|
types = ["d", "d", "d",]
|
|
|
|
table = [ [1,2,3],
|
|
[2,3,4],
|
|
[3,4,5,] ]
|
|
|
|
create_table(path, names, types)
|
|
for row in table:
|
|
append_table(path, row)
|
|
|
|
set_attribute("group/data2", "att", 2)
|
|
|
|
|
|
|
|
|
|
|
|
|