def sparse_to_dense(nonzero_data: np.ndarray, mask: np.ndarray) -> np.ndarray:
    """Decompress the sparse data to dense (decompressed) output."""
    decompressed_val = np.zeros_like(mask, dtype=nonzero_data.dtype)
    decompressed_val[mask != 0] = nonzero_data
    return decompressed_val
Decompress the sparse data to dense (decompressed) output.
coremltools/optimize/_utils.py