hi i have 2 questions
- i have a parametric plot : T=np.linespace(things) X=f(T)*np.cos(T) Y=f(T)*np.sin(T) i would like to get the first and the last point of this polar curve in the specs of "linspace" (https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html) i dont see how to do that automatically is there something simple like "first(X)" and "last(X)"
- i have a function : rotation(vect,theta) which takes vect=[a,b] and theta-rotates it by a matrix how to use this function or such a function to rotate a tuple (X,Y) with X,Y as described above in this message ?
–––––––––––––––––––––––––– Vincent Douce :=: Mathoscope :=: http://mathoscope.xyz http://mathoscope.xyz/ 06°13°11°07°26 Bagnères de Bigorre 65200
I'm not sure I understand the question, but in python, you can get the first and elements of most types of sequences with e.g., X[0] and Y[-1], respectively.
Is the second part of your question just a dot product?
On Sat, Jan 27, 2018 at 10:07 PM, Vincent Douce Mathoscope < mathoscope@netcourrier.com> wrote:
hi i have 2 questions
- i have a parametric plot :
T=np.linespace(things) X=f(T)*np.cos(T) Y=f(T)*np.sin(T) i would like to get the first and the last point of this polar curve in the specs of "linspace" (https://docs.scipy.org/doc/ numpy/reference/generated/numpy.linspace.html) i dont see how to do that automatically is there something simple like "first(X)" and "last(X)"
- i have a function :
rotation(vect,theta) which takes vect=[a,b] and theta-rotates it by a matrix how to use this function or such a function to rotate a tuple (X,Y) with X,Y as described above in this message ?
–––––––––––––––––––––––––– Vincent Douce :=: Mathoscope :=: http://mathoscope.xyz 06°13°11°07°26 Bagnères de Bigorre 65200
NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion