Skip to content

RiseOperation problem when first input is nan #176

@andrewjcraig

Description

@andrewjcraig

class RiseOperation(AbstractOnlineOperation):

class RiseOperation(AbstractOnlineOperation):
    def __init__(self):
        self.prev = -float("inf")

    def reset(self):
        self.__init__()

    def update(self, sample):
        sample_return = min(- self.prev, sample)
        self.prev = sample

        return sample_return

Given a list of inputs, where the first input in the list is nan.
If the STL file, uses the Rise operator.

The initialisation of the RiseOperation begins with self.prev = -float("inf")

If the sample is float("nan"),

then the return sample = min(- self.prev, sample) == float("inf")

The issue is that if the input is nan, presumably, the return of the rise operator should also be nan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions