Skip to content

boolean indexing giving faulty results #68

Closed

Description

@ZacDiggum

Consider this:

a = af.constant(0., d0=3, d1=3)
a[1,1] = 1.

This one makes the whole second row into 2s:
a[a>0.] = 2.
While pavanky's trick gives the correct result:

cond = a>0
a = a*(1-cond)+cond*2.

Update: this also gives wrong results:
a[af.algorithm.where(a>0.)] = 2.

Activity

  1. added this to the 3.3 milestone on Mar 20, 2016
  2. pavanky commented on Mar 20, 2016

    @pavanky
    Member

    @ZacDiggum This should be fixed in devel. Let me know if the problem still persists.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions