Skip to content
Discussion options

You must be logged in to vote

Hi @c86-moe,

You can use the dr.select mask operation when working with JitArray types

# Arrays of width 2
a = mi.Float(1.0, 3.0)
b = mi.Float(2.0, 2.0)
c = mi.Float(3.0, 1.0)

# Will create a new array which when evaluated returns [3.0, 2.0]
d = dr.select(a > 1.0, b, c)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@C8620
Comment options

@C8620
Comment options

@rtabbara
Comment options

@C8620
Comment options

@rtabbara
Comment options

Answer selected by C8620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants