Skip to content

pair methods in backend: potential for simpler code in sum_par etc #1816

Description

@slayoo

As noted by @Bodzio-2,

data_out[:] = 0
for i in numba.prange(length - 1): # pylint: disable=not-an-iterable
if is_first_in_pair[i]:
data_out[i // 2] = np.abs(data_in[idx[i]] - data_in[idx[i + 1]])

the conditional statement can be simplified by multiplying by is_first_in_pair[i]

depending on the size of data_out, also the zeroing could then be potentially unneeded?

analogously in other methods in the same file

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions