May-13-2019, 01:09 PM
How have two lists of unequal length with values in each. I want to multiply these two lists to make an array containing a formula applied to each combination of values
eg
and I want to make a new array © whose values are derived from the formula c=(a*b)+1
I want to do so in the fastest way possible without using for loops.
The expected array © should be
Thanks Peter
eg
1 2 |
a = [ 1 , 2 , 3 , 4 ] b = [ 0 , 1 , 2 ] |
I want to do so in the fastest way possible without using for loops.
The expected array © should be
Output:array([[1, 1, 1, 1],
[2, 3, 4, 5],
[3, 5, 7, 9]])
Can anyone help?Thanks Peter