Groups
Sign in
Groups
ArrayFire Users
Conversations
About
Send feedback
Help
How to do af::replace based on col_index?
20 views
Skip to first unread message
Joe Chan
unread,
Apr 22, 2022, 2:28:04 AM
4/22/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
Copy link
Report message
Sign in to report message
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
5/12/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
Copy link
Report message
Sign in to report message
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