Skip to content

Handle piecewise functions symbolically #9

@pelegm

Description

@pelegm

Currently, the following happens:

In [1]: import sympy

In [2]: p = lambda n: 1 if n == 0 else 0

In [3]: n = sympy.Symbol('n', integer=True, nonnegative=True)

In [4]: p(n)
Out[4]: 0

So, instead, p should be defined as a piecewise function, somehow.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions