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

Fix numba.typed.List extend for singleton and empty iterable #5517

Merged
merged 5 commits into from
Apr 23, 2020

Commits on Apr 7, 2020

  1. fix refinement on extend

    Fixes numba#5152
    
    An implicit assumption was being made about the length of the iterable
    when refining with extend. Specifically, this assumtion was that the
    iterable has lenth >= 2. The code would however fail if the length is 1,
    so this commit fixes that. Tests included.
    esc committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    6c3daac View commit details
    Browse the repository at this point in the history
  2. fix for extend on empty iterable

    This allows an untyped List to be extended with an empty iterable in the
    interpreter. This is results in a NO-OP and is probably unlikely to
    occur often in practice but is fixed for completeness. Tests included.
    esc committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    80a0a88 View commit details
    Browse the repository at this point in the history
  3. fix extending a refined list

    A `numba.typed.List` that is refined failed to extend on an empty
    iterable. This fixes that to be a NO-OP and includes tests.
    esc committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    efb58c6 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. rename test to avoid ambiguities

    The 'term' singleton may not have been the appropriate choice here.
    esc committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    0f13328 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. simplify logic

    This simplifies the logic needed to implement `extend`.
    esc committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    d8119b6 View commit details
    Browse the repository at this point in the history