Skip to content

Conversation

blink1073
Copy link
Collaborator

This implements #63. The only change to existing behaviour is to the interface to run_func.

@isbadawi
Copy link
Collaborator

Looks really cool! I'll let Ariel look at this before merging.

Methods are dynamically bound to instances of Matlab objects and
represent a callable function in the Matlab subprocess.

Args:
Copy link
Owner

Choose a reason for hiding this comment

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

Please use the numpy docstring standard.

@blink1073
Copy link
Collaborator Author

Note that a bulk of the code was pulled from #63.

@blink1073 blink1073 closed this Feb 17, 2015
@blink1073 blink1073 reopened this Feb 17, 2015
@blink1073
Copy link
Collaborator Author

Open question: should run_func be made to look more like run_code, returning stdout and any created figures? Also, should the dynamic functions return just the response or the full dictionary? For example m.plot([1,2,3]) would make the plot but we'd never see it. If we got the path to the created figure, we could do something with it.

@blink1073
Copy link
Collaborator Author

Here's what I propose:
Use pymat_eval for both, and either run evalin or a version of pymat_feval here.

@arokem
Copy link
Owner

arokem commented Feb 17, 2015

Just to see that I understand: this would grab the figures and stdout in
the magic even if you call a function that creates the figure? I like that.

On Tue, Feb 17, 2015 at 7:17 AM, Steven Silvester notifications@github.com
wrote:

Here's what I propose:
Use pymat_eval for both, and either run evalin or a version of pymat_feval
here
https://github.com/arokem/python-matlab-bridge/blob/master/pymatbridge/matlab/util/pymat_eval.m#L38
.


Reply to this email directly or view it on GitHub
#145 (comment)
.

@blink1073
Copy link
Collaborator Author

To be clear, the matlab magic already uses run_code exclusively, so this would affect run_func and the dynamically created functions.

@blink1073
Copy link
Collaborator Author

I think this is good to go now. I will make the changes to the Matlab end in another PR.

@arokem
Copy link
Owner

arokem commented Feb 17, 2015

Gotcha. Looks good!

arokem added a commit that referenced this pull request Feb 17, 2015
@arokem arokem merged commit 2717bed into arokem:master Feb 17, 2015
@blink1073 blink1073 mentioned this pull request Feb 18, 2015
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