mdim and shape from the broadcasted array
Comments tweak
Do not necessarily copy input arrays