edit: optimized zero_transform_pivots