Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reshape method to compliment flatten for Series objects #335

Open
bainzo opened this issue Jun 16, 2016 · 0 comments
Open

Reshape method to compliment flatten for Series objects #335

bainzo opened this issue Jun 16, 2016 · 0 comments

Comments

@bainzo
Copy link

bainzo commented Jun 16, 2016

Would it be possible to add a reshape style method to the Series object?

Currently if you need to flatten a series, for instance to perform factorization, there is no native way of reshaping the resulting series' spatial dimensions to that of the original series.

A workaround involves calling np.reshape with a concatenated tuple for the dimensions, for example,

w_reshape = np.reshape(w, ts.shape[:2] + w.shape[1])

However, if the series w is on Spark this appears to collect w before reshaping, and also returns an Numpy array which requires an extra step to make w a series again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant