ICE: Summing up array elements by group


Given an array like

[0, 3, 7, 22, 6, 71, 1, 0, 9]

how do you sum up the first group of three elements (0+3+7), the second group of three elements (22+6+71), the third group (1+0+9), and so on and so on, without using a Repeat node?

Well, you could write your own custom ICE node. Or you could use Generate Sample Set like this:

generate_sample_set_add_array_groups

One thought on “ICE: Summing up array elements by group

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s