lumopt2.utils.sparse_helpers#
Stateless utility functions for sparse-dense index conversions.
These functions convert between flattened sparse indices and multi-dimensional dense indices for N-dimensional arrays. They have no dependency on Lumerical or any simulation state.
Functions#
|
Convert multi-dimensional dense indices to flattened sparse indices. |
|
Convert flattened sparse indices to multi-dimensional dense indices. |
|
Re-index sparse indices from one dense shape to another with offsets. |