Skip to content

Exposed some query methods - #1981

Closed
anutosh491 wants to merge 4 commits into
symengine:masterfrom
anutosh491:expose_some_attributes
Closed

Exposed some query methods#1981
anutosh491 wants to merge 4 commits into
symengine:masterfrom
anutosh491:expose_some_attributes

Conversation

@anutosh491

Copy link
Copy Markdown
Contributor

No description provided.

@isuruf isuruf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these methods and just 5 of them?
It's a simple one liner basic_get_type(s) == SYMENGINE_ADD.

@certik

certik commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

I agree, I think basic_get_type(s) == SYMENGINE_ADD seems good enough to me.

@certik certik closed this Oct 3, 2023
@anutosh491

Copy link
Copy Markdown
Contributor Author

I think so here we would only need the basic_is_Exp function because I don't we have something like
basic_get_type(s) == SYMENGINE_EXP
The type of s would still be Pow, we would just need to check it's base against E

@certik

certik commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

Why couldn't we do basic_get_type(s) == SYMENGINE_EXP in LPython?

@anutosh491

Copy link
Copy Markdown
Contributor Author

Because I don't think we have a defined SYMENGINE_EXP class type registered here (https://github.com/symengine/symengine/blob/master/symengine/type_codes.inc)

@certik

certik commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

EXP I think is represented as just Power with a base E.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants