This autoscale function performs data standardization, a crucial preprocessing step in many data analysis workflows. By centering the data to have zero mean and scaling it to unit variance, this function enhances the comparability of data features. The function supports autoscaling in both column-wise (feature-centric) and row-wise (sample-centric) directions.