Hi, due to unitvec function there is no possibility to store 'list' vector - it has to be np.array /ndarray, otherwise None is returned.
Due to fact there is no imput check maybe it will be nice to edit unitvec function so it will change list object to np.array, e.g:
def unitvec(vec):
"""
Scale a vector to unit length. The only exception is the zero vector, which
is returned back unchanged.
"""
if isinstance(vec, list):
vec = numpy.array(vec)
....
BR, Marcin
Hi, due to unitvec function there is no possibility to store 'list' vector - it has to be np.array /ndarray, otherwise None is returned.
Due to fact there is no imput check maybe it will be nice to edit unitvec function so it will change list object to np.array, e.g:
BR, Marcin