Refactor local_weighted_learning.py to use np.array
#8069
Merged
local_weighted_learning.py to use np.array
#8069