MAINT: move special-cased linear algebra functions into their own module