# Multiply Numpy n x 2 array by n x 1 array

Assuming I have a Numpy n x 2 array y: array([[1, 1], [2, 3], [1, 4], …]) and a Numpy n x 1 array x: array([2, 4, 5, …]), how can I efficiently obtain the following result, n x 2 array: array([2, 2], [8, 12], [5, 20], …]), where each element (array) of the y… Read More Multiply Numpy n x 2 array by n x 1 array