This docstring is not accurate as it might return a numpy array if returns='numpy'