Matrix dimension safety for some LUdecomp methods