Skip to content

Minor Improvement in atoms() and Tests #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2017
Merged

Conversation

ShikharJ
Copy link
Member

@ShikharJ ShikharJ commented Feb 22, 2017

Fixes #121
@isuruf A similar function is implemented for DenseMatrix also. Are the changes required there too?

@@ -588,8 +588,12 @@ cdef class Basic(object):
s = set()
if (isinstance(self, types)):
s.add(self)
Copy link
Member

Choose a reason for hiding this comment

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

You can add the above 3 lines inside if types clause.

@ShikharJ
Copy link
Member Author

Updated @isuruf.

s.update(arg.atoms(*types))
else:
for arg in self.args:
s.update(arg.free_symbols)
Copy link
Member

Choose a reason for hiding this comment

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

You can just return arg.free_symbols

@ShikharJ
Copy link
Member Author

Updated again @isuruf. Can you please take a final look?

@isuruf isuruf merged commit 78800c4 into symengine:master Feb 24, 2017
@ShikharJ ShikharJ deleted the Issue121 branch February 24, 2017 07:25
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.

2 participants