These are chat archives for symengine/symengine

23rd
Jul 2017
Isuru Fernando
@isuruf
Jul 23 2017 09:45
@ShikharJ, you can implement one in symengine.py
Shikhar Jaiswal
@ShikharJ
Jul 23 2017 09:46
I guess, that has to be done in the SymEngine side as well? Or should we just stick to a single class storing objects such as Zero or One?
Isuru Fernando
@isuruf
Jul 23 2017 09:48

I don't think you have to change it in SymEngine.

Or should we just stick to a single class storing objects such as Zero or One?

what's the reason for that?

Shikhar Jaiswal
@ShikharJ
Jul 23 2017 09:53
I was referring to the idea of a makeshift class, storing attributes such as Zero, One and so on which return Integer(0) and Integer(1) respectively. Should the SymEngine.py's implementation be exactly in the same fashion as SymPy's implementation?
Isuru Fernando
@isuruf
Jul 23 2017 09:54
That's not different to just using S(0) instead of Zero.

I guess, that has to be done in the SymEngine side as well

Even if there is one C++ object and 2 python objects wrapping the same C++ object, it is not a singleton

So, it has to be implemented in python side
Shikhar Jaiswal
@ShikharJ
Jul 23 2017 09:58
I figured, but since the code would remain unchanged in SymPy, without the use of SymEngine, S.Zerowould remain S.Zero, while using SymEngine, we'll be using SymEngine's S(0), i.e. SymEngine's Integer(0).
Wouldn't that give a speedup?
Isuru Fernando
@isuruf
Jul 23 2017 09:59
My main issue with that is that it'll be introducing a singleton registry, but it's not a singleton
Shikhar Jaiswal
@ShikharJ
Jul 23 2017 10:02
Ok, then implementing the registry in SymEngine.py is what we'll do.