I am new to python and need to do the following thing:
I've given an 1d array of vectors (so pretty much 2d).
My task is to create an 1d array that contains the length of each vector.
array([[0. , 0. ],
[1. , 0. ],
[1. , 1. ],
[1. , 0.75],
[0.75, 1. ],
[0.5 , 1. ]
...
should be converted to
array([0,
1,
1.4142,
...
I could easily do this in theory but I am not familiar with the inbuild commands of python and I am very happy if someone could tell me some inbuild commands of python that can do this.