Fix array shape bug in matprod in mathmagic.fun.