Skip to content
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

Add method to convert a sym to a pyobject #515

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

cbm755
Copy link
Collaborator

@cbm755 cbm755 commented Aug 24, 2016

This is for use with the Pytave project.

This is for use with the Pytave project.
@cbm755
Copy link
Collaborator Author

cbm755 commented Aug 24, 2016

This was #509, reopened after pytave merge


function y = pyobject (x)

y = py.sympy.S (char (x));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this will need to be sympy (x) not char (x) b/c of recent changes.

@mtmiller
Copy link
Collaborator

My only nits to pick are the names. The name pyobject isn't Matlab compatible, it's what we came up with to be the hidden implementation of PyObjects, which is fine, but it's kind of like an implementation detail at this point.

I also prefer have_pytave to be something else since the name pytave will be obsolete soon.

@cbm755
Copy link
Collaborator Author

cbm755 commented May 20, 2017

I changed to have_py. I agree with the other point and have moved the discussion upstream: https://bitbucket.org/mtmiller/pytave/issues/61/have-subsasgn-pycall-others-cast-their

@mtmiller
Copy link
Collaborator

Thanks for the reminder about the upstream issue, I had been wondering what the use case would be, now I see that you want to be able to assign a sym variable into a container, and not that the user is calling the conversion method explicitly. So the intent is that this effectively acts as an implicit casting operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants