use numpy broadcasting instead of function 'tile'