make getindices work for vectors
add asserts to test
fix bug due to sparse matrix implementation, allow promotion of vectors by multiplying by a constant from either side