tea-lang-org / tea-lang

DSL for experimental design and statistical analysis
Apache License 2.0
254 stars 32 forks source link

numeric type does not work in released version #69

Open domoritz opened 4 years ago

domoritz commented 4 years ago
tea.data(data, key="participant")
variables = [
    {
        'name' : 'variability',
        'data type' : 'nominal',
        'categories' : [0.15, 0.4]
    },
    {
        'name' : 'flipped',
        'data type' : 'nominal',
        'categories' : [0, 1]
    },
    {
        'name' : 'error',
        'data type' : 'numeric'
    }
]
tea.define_variables(variables)

Leads to

File "/Users/dominik/Code/line-bias-data/analyze.py", line 123, in <module>
    tea.define_variables(variables)
File "/Users/dominik/opt/anaconda3/envs/ids/lib/python3.8/site-packages/tea/api.py", line 87, in define_variables
    assert (var[var_dtype] == 'ratio')
domoritz commented 4 years ago

I guess the problem could be that the docs are already using a newer version than what is available on pip. See https://github.com/tea-lang-org/tea-lang/issues/51

domoritz commented 4 years ago

I guess the problem is that the docs are too new.