Functions in Formulaic? #1337
              
                Unanswered
              
          
                  
                    
                      johndburger
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 2 replies
-
| Hi @johndburger, you're right, this is broken. I think I've identified what's going on, and am doing some tests now to see if I can fix it on my side | 
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've searched this board and Formulaic's but can't figure this out.
This is my first time running some older code since Lifelines switched from Patsy. I'm using a formula with numpy's log10 function, like so:
formula="... + np.log10(x) ..."Previously this worked fine, since the place where this is used does this:
import numpy as npThis no longer works, I get
NameError: name 'np' is not definedI've even tried importing
log10directly and using this syntax:"... + I(log10(x)) ..."I still get:
NameError: name 'log10' is not definedWhat am I missing, do I have to do something special to get Formulaic to understand such functions?
Beta Was this translation helpful? Give feedback.
All reactions