python - Rampfunction code -


i'm trying solve problem: create function reproduces rampfuntion

                     n, n >= 0                  r(n)=                      0, n < 0 

can help?

you gave python tag, i'll in python.

ramp = lambda x: x if x >= 0 else 0 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -