Skip to content

Feature Request: Include all possible functions in is_function() #31

@lfrommelt

Description

@lfrommelt

I sampled functions based on the complete function space from tree.FUNCTIONS, so for instance sinh could be drawn. If I want to re-initialize a function from sympy, the dafault function check checks only the default functions. So I did the following:

function_space = list(equation_tree.tree.FUNCTIONS.keys())

equation=EquationTree.from_sympy(sympy_equation, function_test=lambda f: f in function_space, variable_test=lambda x: "x" in x)

So everything works as intended, it would however be more convenient and straight forward, if the default function check defaults.is_function() would be based on the complete function space as well and not on the defaults.DEFAULT_FUNCTION_SPACE.

I think in principle the from_sympy()-function should raise an error, if parts of the input cannot be parsed. (In my case "sinh" was silently interpreted as "sin".)

Cheers,
Leonard

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