bastibe / transplant

Transplant is an easy way of calling Matlab from Python
https://transplant.readthedocs.io
Other
110 stars 26 forks source link

Escape numeric field names to comply to matlab structs #9

Closed janw closed 9 years ago

janw commented 9 years ago

Since matlab only accepts struct fields to beginn with a letter, a arbitrary string alpha__ is prefixed if the first character of a proposed field name is not a letter.

bastibe commented 9 years ago

Thank you for this contribution! It is sad that Matlab does not contain a proper mapping type for arbitrary strings to arbitrary data.

janw commented 9 years ago

My pleasure! I guess that's just the essence of working with Matlab: 25% of the time you get some actual programming done, 75% of the time you go crazy looking for workarounds for unsupported stuff.