Feature Request/Suggestion: Ability to `.reshape(...)` array when chunk size unknown
See original GitHub issuehttps://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:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closed via #4515
I believe that the
DataFrame.to_dask_array
method already supports alengths=
parameter, so there is good precedence for this (and a good API and implementation to follow). Adding that also toto_records
sounds good to me.