Maxout now supports more than 2 dims

Sorry for nitpicking: can you please replace numpy.ones with some random matrix? That would be a bit better test.