Forum Discussion
joelb95
Nov 04, 2024Brass Contributor
Stacking row/columns of an array - some module formulas
I just wrote a few functions that should theoretically allow you to take an array, chunk it by rows or columns, and then stack them in the other dimensions, e.g. you have 10 rows by 3 columns and you...
UrielGrove
Mar 13, 2025Iron Contributor
It sounds like you're working on a useful set of functions to manipulate arrays by chunking and stacking them in different dimensions. Below is a Python representation of how you might implement your desired functionality using NumPy, which is a powerful library for numerical computing.
Let's create functions to accomplish the following tasks:
- Chunk an array by rows or columns.
- Stack chunks in the other dimension.
- Flatten an array.
- Handle optional fill values for rows and columns.