more docstrings, slight refactoring
make inference methods compatible with 1d input