Skip to content

stored vector cannot be list #83

@mkoralew

Description

@mkoralew

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions