[FR]: Preallocate tiles with NumPy arrays for better performance and code clarity
Open
enhancement
- Dominant language
- Python
- Stars
- 371
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
### Feature Summary
Replace nested list pre-allocation of 'tiles' with NumPy arrays using `np.empty(shape, dtype=object)`. Update all tile access patterns from tiles[i][j][k] to tiles[i, j, k] for consistency and improved code readability.
### Use Cases
- Enables more pythonic and efficient handling of multi-dimensional tiles and blocks.
- Reduces memory allocation overhead and potentially improves execution performance.
- Makes tile-based operations more readable and maintainable, especially for future features dependent on array shape.
- Cleaner integration of code with scientific Python ecosystem and facilitates future optimizations leveraging NumPy.
Contributor guide
Assessment
This issue has not been assessed yet.