fix #5: ensure dtype consistency in matvec