Groups
Conversations
All groups and messages
Send feedback to Google
Help
Sign in
Groups
ArrayFire Users
Conversations
About
How to do af::replace based on col_index?
14 views
Skip to first unread message
Joe Chan
unread,
Apr 22, 2022, 2:28:04 AM
Apr 22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ArrayFire Users
Assume I have an array "a" with dim4 = h, w, c, 1
I want to assign blue color when column index is smaller than w/2
something like below
array out = af::replace(a, a.col < w/2, (255,0,0));
But how?
Umar Arshad
unread,
May 12, 2022, 2:03:28 PM
May 12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ArrayFire Users
Try:
Assuming RGB:
a(seq(w/2), span, 2) = 255:
Reply all
Reply to author
Forward
0 new messages