attempt to prevent KeyError from happening in buildsphinx
refactored ndim -> n_inputs and outdim -> n_outputs
fixed typo
fixed n_inputs back to n_dim where we really wanted to have an array.
found some more outdims and changed them
changed documentation wording
fixed some of the wrongly changed ndims back
corrected one more overzealous refactor
corrected another overzealous refactor
Merge pull request #1058 from eteq/fix-keyerror-at-exit

Prevent KeyError when build_sphinx fails in ``-w`` mode
Merge pull request #1067 from wkerzendorf/models/refactor_ndim_outdim

Renaming ndim and outdim in modelling
bringing changes from upstream and resolving conflicts