matlab2python icon indicating copy to clipboard operation
matlab2python copied to clipboard

Too many return statements

Open brodkemd opened this issue 4 years ago • 3 comments

Hello,

First off let me say thank you for writing this code! It is tremendously helpful to me. I am running into a problem where when the software converts a function it adds multiple return statements. I'm looking through the code to trying to find why but I thought you may be able to point to where I should look.

Thanks!

brodkemd avatar Sep 11 '21 21:09 brodkemd

Hi, I'm a bit too busy at the moment to figure it out, so it's nice if you manage to dive in the code and try to find the problem. You can also try to create a small minimal example that reproduce the issue. That's usually the best start. Thanks for using the code! Cheers,

Emmanuel

ebranlard avatar Sep 13 '21 02:09 ebranlard

Alright , I made a band aid for it now but I'll try and figure it out. Also, I have added code that adds import statements to the beginning of a file if the code comes across a function call from another matlab file in the directory. If that sounds useful to you let me know and I can start a pull request so you can see the changes.

  • Marek

brodkemd avatar Sep 13 '21 13:09 brodkemd

Hi Marek,

That sounds good! Yes, feel free to send a pull request. Cheers,

Emmanuel

ebranlard avatar Sep 13 '21 16:09 ebranlard