Skip to content
New issue

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

ENH: make correct python variable names #314

Merged
merged 2 commits into from Jun 19, 2012
Merged

ENH: make correct python variable names #314

merged 2 commits into from Jun 19, 2012

Conversation

jseabold
Copy link
Member

Make correct python variable names

> name <- "I am a Pr(<10).R name"
> sanitize_name(name)
[1] "I_am_a_Pr10_R_name"

@josef-pkt
Copy link
Member

This doesn't work at that location, at least not without being able to turn it off.

sanitize is done around line 36, after that I construct the python name, which can have dots in it for attributes, e.g.
sur.equ1.params sur.equ1. would be given as a prefix argument.
That version should be replaced by the new enhanced version of sanitize.

one option if you want to call mkarray2 directly: create keyword argument in mkarray2 that allows turning off sanitize.
But it might be easier just to call cat_items with a named list to use mkarray2 indirectly, I think.

@jseabold
Copy link
Member Author

Oh I didn't see that you were also using mkarray2 in cat_items

@jseabold
Copy link
Member Author

I fixed it to be optional not default. I'm just extending it for my current needs.

@josef-pkt
Copy link
Member

Now that I figured out how to do this, I want to make it into functions that can be used in many or most regular cases, without having to know or remember any R details.

@jseabold
Copy link
Member Author

Ok to merge?

@josef-pkt
Copy link
Member

fine with me.

jseabold added a commit that referenced this pull request Jun 19, 2012
ENH: make correct python variable names in topy.R
@jseabold jseabold merged commit af26395 into master Jun 19, 2012
PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this pull request Sep 2, 2014
ENH: make correct python variable names in topy.R
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.

None yet

2 participants