R/070_atoms_elementwise_pos.R

Defines functions pos

Documented in pos

#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/atoms/elementwise/pos.R
#####

## CVXPY SOURCE: atoms/elementwise/pos.py
## Pos -- positive part max(x, 0)

#' Positive part: max(x, 0)
#'
#' @param x An Expression
#' @returns A Maximum atom
#' @export
pos <- function(x) {
  Maximum(x, 0)
}

Try the CVXR package in your browser

Any scripts or data that you put into this service are public.

CVXR documentation built on March 6, 2026, 9:10 a.m.