Skip to content

mixing boolean filters with other filters is broken #246

Closed

Description

@gdementen
>>> arr = ndrange('a=a0..a2;b=0..9')
>>> arr
a\b |  0 |  1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9
 a0 |  0 |  1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9
 a1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19
 a2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29
>>> arr[arr.b < 5]
a\b |  0 |  1 |  2 |  3 |  4
 a0 |  0 |  1 |  2 |  3 |  4
 a1 | 10 | 11 | 12 | 13 | 14
 a2 | 20 | 21 | 22 | 23 | 24
>>> arr['a1', arr.b < 5]
ValueError                                Traceback (most recent call last)
...
ValueError: b |    0 |    1 |    2 |    3 |    4 |     5 |     6 |     7 |     8 |     9
  | True | True | True | True | True | False | False | False | False | False is ambiguous (valid in a, b)
>>> arr['a1', x.b < 5]
AssertionError                            Traceback (most recent call last)
...
AssertionError: <larray.core.BinaryOp object at 0x000001519BB97160> (<class 'larray.core.BinaryOp'>) is not scalar
>>> # but this works
>>> arr['a1'][arr.b < 5]
b |  0 |  1 |  2 |  3 |  4
  | 10 | 11 | 12 | 13 | 14
>>> arr['a1'][x.b < 5]
b |  0 |  1 |  2 |  3 |  4
  | 10 | 11 | 12 | 13 | 14

Activity

  1. changed the title [-]fix mixing boolean filters with other filters[/-] [+]mixing boolean filters with other filters is broken[/+] on May 8, 2017
  2. added 3 commits that reference this issue on Aug 24, 2017
    4e138ca
    b16ee87
    f9b3286
  3. added a commit that references this issue on Aug 31, 2018
    618cf94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions