Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow nested lists to be passed into genned code #263

Open
wants to merge 1 commit into
base: generated_code_accepts_lists
Choose a base branch
from

Commits on Nov 4, 2022

  1. Allow nested lists to be passed into genned code

    This is done by adding `sym.util.check_matrix_size_and_numpify` and
    calling it on the matrix inputs (when `use_numba=False` and
    `reshape_vectors=True`). This function converts list arguments to
    ndarrays and checks that the shape is what is expected.
    
    Note, numpy only raises a deprecation warning if a ragged nested list is
    passed in.
    
    If `use_numba=True`, just performs an inline check on the shape of the
    input, raising an `IndexError` if it is not what was expected. It never
    performs a reshape on matrix arguments.
    
    Also adds the type alias `sym.util.MatrixType` and
    `sym.util.VectorType`. This is to make the type annotations less
    verbose.
    bradley-solliday-skydio committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    09995d4 View commit details
    Browse the repository at this point in the history