Solved by KarthikR in post #6 
              
              
                Can you try to isolate which segment is giving the error (as you use plot and scatter plots) and for that, can you reshape the values you pass to Matplotlib? 
Eg: 
import numpy as np 
import matplotlib.pyplot as plt 
x = np.random.rand(24,20) 
x = x[:, :-1] 
print(x.shape) 
x = x.mean(axis=0) 
y = n…