hannes603 Posted December 6, 2023 Share Posted December 6, 2023 in wrangle its just avg(array).. in vop the avg node does not work with arrays Quote Link to comment Share on other sites More sharing options...
Librarian Posted December 6, 2023 Share Posted December 6, 2023 (edited) Try this https://vimeo.com/824101376 29:23 and this One. https://www.youtube.com/watch?v=1T4oouCFbY4 Edited December 6, 2023 by Librarian 1 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 6, 2023 Author Share Posted December 6, 2023 thanks. strange that i need a loop for this one Quote Link to comment Share on other sites More sharing options...
animatrix Posted December 6, 2023 Share Posted December 6, 2023 (edited) Unfortunately the VOP version doesn't support arrays. You can either use loops or the Snippet VOP and call avg(). Edited December 8, 2023 by animatrix Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 7, 2023 Author Share Posted December 7, 2023 @animatrix can you write it for me , i cant manage , never worked with the snippet vector_int_array_avg_average_vop.hip Quote Link to comment Share on other sites More sharing options...
animatrix Posted December 8, 2023 Share Posted December 8, 2023 You were almost correct, but you are assigning the result back to the array. There is no version of the avg function that takes and array and returns an array. Adjusting it like this works: 1 1 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted December 8, 2023 Author Share Posted December 8, 2023 Thanks a lot, makes sence Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.