Comments (10)
maybe you have an outdated version of networkx? Try:;
import networkx
networkx.version
What did you get?
from smop.
To simplify matters install once with easy_install -- it will bring current versions of everything.
easy_install --user smop
from smop.
Hi victorlei, thanks a lot for your quick reply. Here is what I got:
networkx.version
'0.37'
I don't have write access to the computer, so I will ask my administrator to install it. Thanks for your help!
from smop.
try
easy_install --user networkx
from smop.
this is a very old version. Current is 1.9.1
from smop.
Yes, many of my python modules are too old. Smop works well after the new versions were installed. Thanks victorlei.
from smop.
You are welcome. I am always curious what kind of code is converted using smop, so maybe you could post some of your code
from smop.
I want to convert a standard MATLAB function "imfindcircles" into python, not sure if it is right to post the code here because of the authorization issue, but the file imfindcircles.m can be found in the MATLAB directory if you have MATLAB installed.
Smop worked well with the example solver.m, but so far I have not converted imfindcircles.m successfully. There was no error message showed up, but the converted code was incorrect (looks like smop didn't walk into the MATLAB code). I am still checking to see if I can have this fixed.
Here is what I had:
Autogenerated with SMOP version
main.py /smop/CODE/imfindcircles.m -o /smop/CODE/imfindcircles.py
from future import division
from runtime import *
Thanks!
from smop.
Are you sure that m file is not empty?
from smop.
Hi victorlei. Yes, the .m file is not empty, it is a standard MATLAB function with 303 lines.
It is very interesting that the problem seems to be solved by deleting the "end" at the end of the .m file
The original .m file looks like this:
function [output1, output2, output3] = function_name(inputs)
lines that do the job
end
I deleted the "end", then smop generated a .py file which was not empty. I haven't test the converted python code yet, but I think it should work with some modifications.
Thanks a lot for your work, it saves my time (otherwise will have to do it manually T_T). Very cool job!
from smop.
Related Issues (20)
- 'DiGraph' object has no attribute 'node' HOT 15
- The function call to 'arange' function in converted .py file is incorrect
- Future Warning: Possible nested set at... creates tons of "str" output HOT 6
- No output and no file created HOT 5
- Lexer crash on `...>=(...)...` HOT 1
- FutureWarning: Possible nested set at...
- Python 2 print statement in test_primes.py HOT 1
- issue working HOT 1
- NEED HELP !! nothing created for running the main HOT 1
- New Matlab Lexer & Parser HOT 5
- Maintenance? HOT 2
- iscell is not defined
- Does'nt run with Python 3.9.5 cannot import name 'gcd' from 'fractions' HOT 1
- New similar project [mat2py](https://mat2py.org/)
- TypeError: '<' not supported between instances of 'NoneType' and 'NoneType' HOT 1
- ImportError on windows HOT 3
- smop command not found even after installation HOT 1
- Where does .py go to? HOT 1
- Doesn't work: python main.py fastsolver.m AND smop fastsolver.m HOT 3
- Observations about SMOP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smop.