question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request/Suggestion: Ability to `.reshape(...)` array when chunk size unknown

See original GitHub issue

https://github.com/dask/dask/issues/1839 discusses about having the ability to .reshape(...) a dask array when the chunk size is unknown.

I am converting dataframe -> array, and would like to be able to reshape it.

One idea I had is add the ability to pass in a “length” or “chunk_size” argument to df.to_records(), since for my particular problem I know this.

Would this be of interest? I would be happy to have a go at an implementation if so.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jrbourbeaucommented, Jun 18, 2019

Closed via #4515

1reaction
mrocklincommented, Feb 9, 2019

I believe that the DataFrame.to_dask_array method already supports a lengths= parameter, so there is good precedence for this (and a good API and implementation to follow). Adding that also to to_records sounds good to me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add DataFrame.to_dask_array · Issue #3090 · dask ... - GitHub
A public API for converting an array with unknown chunks to known chunks. If we already know the chunk sizes, we can already...
Read more >
How to Index, Slice and Reshape NumPy Arrays for Machine ...
The reshape() function takes a single argument that specifies the new shape of the array.
Read more >
Reshaping python array for unknown rows using -1 & filling ...
I know I can use reshape(-1,5) that way it creates the rows based on the array length. But it gives me this error:...
Read more >
Numpy Reshape - How to reshape arrays and what does
Let's see an example where the input array dimensions are not known but 2 rows are required in the output array. Step 1:...
Read more >
Reshape NumPy Array - GeeksforGeeks
Reshaping numpy array simply means changing the shape of the given array, shape basically tells the number of elements and dimension of array, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found