I have an array of arrays and I need to calculate the z-score for each array i.e. z-score for each row in that array of arrays.
My code:
for x in train_image_resize:
train_image_resize_mean = scipy.stats.zscore(x)
Error: C:\ProgramData\Anaconda3\lib\site-packages\scipy\stats\stats.py:2253: RuntimeWarning: invalid value encountered in true_divide return (a - mns) / sstd
If I do scipy.stats.zscore(train_image_resize), then it calculates the z-score of each number in the array of arrays. However, I wish to calculate one z-score for each array.