I'm not a fan of the docstring. I'll see if I can come up with something better (and I think the result shape is not correct either).