Allow non-literal series objects in tables
Example:
sigma = 3.405 [angstrom]
h = sigma * 2**(1/2) / 2
x = map((x: h*x), (x: 1., 1., 0.))
y = map((x: h*x), (y: 1., 0., 1.))
z = map((x: h*x), (z: 0., 1., 1.))
symbols = (symbols: 'Ar', 'Ar', 'Ar')
atoms = (atoms: Table with columns = (symbols, x, y, z))
struct = Structure Ar3 from (
(atoms: Table with columns = (symbols, x, y, z)),
(pbc: [true, true, true]),
(cell: [[2., 0., 0.], [0., 2., 0.], [0., 0., 2.]] [angstrom])
)
print(atoms)
- The first problem is that in static typechecking it is assumed that the objects in
columns_tuple
are Series or references to Series. After adding these objects tocolumns
it is asserted that all elements incolumns
are Series. Instead of this their type should be checked:assert issubclass(column.type_, typemap['Series'])
and notassert isinstance_m(column, ['Series'])
. - The second problem is the static check of attributes in specialized Tables for example in AMML Structure object. This check is partially impossible if these objects are no Series literals.