Skip to content

ProcessBuilder __getitem__ support #228

Closed
@soxofaan

Description

@soxofaan

from openEOPlatform/documentation#10

def fit_function(x:ProcessBuilder, parameters):
    pi = math.pi
    a0 = array_element(parameters, 0)
    a1 = array_element(parameters, 1)
    a2 = array_element(parameters, 2)
    return a0 + a1*cos(2*pi/31557600*x) + a2*sin(2*pi/31557600*x) # 31557600 are the seconds in one year

It would be nice to allow writing parameters[0] instead of array_element(parameters, 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions