lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Errors relating to math module

Open swamishiju opened this issue 8 months ago • 0 comments

Currently the integration test for the math module doesn't work I have compiled a list of issues that cause this

  • [x] Kwargs are not supported in general (in is_close specifically)
  • [ ] Functions returning non trivial data types (modf, frexp) which are then assigned to a variable

Another error i found while testing is

  • Functions returning non trivial data types which are not assigned to anything or passed into functions

Simplest replication code for each

def f(x: i32 = 0):
    print(x)
def f() -> list[i32]:
    return [1,2]

x: list[i32]
x = f()
def f() -> list[i32]:
    return [1,2]

f()

The only cases in which function returning lists and tuple are not a headache is when we use it as input to some function

swamishiju avatar Apr 11 '25 06:04 swamishiju