These are chat archives for symengine/symengine
varsupposed to be injected into global namespace? I mean even if called within a function, it still gets injected. This is what is tested at test_var
var("x") gc.collect() y = x + 1
this should be valid right? Since symbol x can be called at the end gc.collect() does not remove it right?
def f(): var("x") y = x + 1 f() gc.collect()
Does not fix it.
If you look at the source code, you can see that it grabs the parent stack frame and injects there.
This is done recursively right?
In : from symengine import var In : def f(): ...: var("x") ...: y = x + 1 ...: In : def test_var(): ...: f() ...: x = 1 ...: import gc ...: gc.collect() ...: In : test_var() In : x Out: x
del xor something like that), so that it gets deallocated by Python on exit.
varis meant for an interactive user code, not for library code. So it's actually fine if it gets injected into global namespace, if we can't figure out how to do it in the local namespace (which would obviously be better). We just need to figure out how to make the test code not leak.
Just cmake and symengine would do, since you have curl installed in linux and osx