We're trying to follow [this standard][1] for docstrings. So 

```
Parameters
---------------
axes : expected type
    Description goes here.
dimshuffle_pattern : expected type
    Description goes here.
```

That said, I don't understand the `dimshuffle_pattern` or the need for it. Your documentation should make that clearer, with the rationale explained probably in a Notes section in this docstring.