Numpy – create matrix with rows of vector
I have a vector [x,y,z,q] and I want to create a matrix:
I have a vector [x,y,z,q] and I want to create a matrix:
I need to create a 2D array where each row may start and end with a different number. Assume that first and last element of each row is given and all other elements are just interpolated according to length of the rows In a simple case let’s say I want to create a 3X3 array with same start at 0 but different end given by W below:
I have the following code. It is taking forever in Python. There must be a way to translate this calculation into a broadcast…