I would like some help with a problem. In Python:
a=array([2,2])
b=ones((2,10))
I would like to know if there is a function that allows me to subtract b-a to have an array of 2×10 full of -1.
I can do it one with 1D arrays, I just wanted to know if it is possible to do with 2D arrays.
Thanks
Add a new dimension to
a:where
a[:,None]becomesarray([[2], [2]]), a 2×1 array which you can substract from a 2×10 array and get a 2×10 array full of -1.