We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I found out that, passing a python dict or octave struct to an octave function, fieldnames that start with number are ignored.
Here an example. python script
from oct2py import octave, Struct test = Struct() test["word"] = 100 test[str(3)] = 200 test["4"] = 300 test["4test"] = 400 test["test4"] = 500 print("Structure inside python") print(test) print("\n") octave.oct_test(test)
octave function:
function oct_test(test_struct) disp("Structure inside octave function") disp(test_struct) endfunction
the output is: Structure inside python {'word': 100, '3': 200, '4': 300, '4test': 400, 'test4': 500}
Structure inside octave function scalar structure containing the fields:
word = 100 test4 = 500
Am i doing something wrong?
The text was updated successfully, but these errors were encountered:
I think it is a limitation in scipy.savemat. Here's the value we're passing to it in my local experiment:
scipy.savemat
array(['base', 'test', {'test4': 500.0, '4test': 400.0}], dtype=object)
Sorry, something went wrong.
No branches or pull requests
I found out that, passing a python dict or octave struct to an octave function, fieldnames that start with number are ignored.
Here an example.
python script
octave function:
the output is:
Structure inside python
{'word': 100, '3': 200, '4': 300, '4test': 400, 'test4': 500}
Structure inside octave function
scalar structure containing the fields:
Am i doing something wrong?
The text was updated successfully, but these errors were encountered: