tvb-root icon indicating copy to clipboard operation
tvb-root copied to clipboard

Models should not specify _nvar

Open maedoc opened this issue 3 years ago • 1 comments

Describe the bug

Models can specify incorrect _nvar.

Steps to reproduce

class Model:
    _nvar = 3
    state_variables = 'r', 'V'

m = Model()
m.nvar()  != len(m.state_variables)

Expected results

class Model:
    state_variables = 'r', 'V'

m = Model()
m.nvar()  == len(m.state_variables)

The nvar property should self._nvar = len(m.state_variables) and return that. Better if these become immutable attributes.

maedoc avatar Apr 12 '22 13:04 maedoc

Hi @maedoc sir i am begginer , i would like to work on this issue, can you help me understand what needs to be done?

Bikisome avatar Jan 12 '23 14:01 Bikisome