Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/atoms/sum_smallest.R
#####
## CVXPY SOURCE: atoms/sum_smallest.py
## At 1.9.0: sum_smallest threads axis/keepdims through to sum_largest (PR #3172).
## 2D axis slice fully ported; N/A for CVXR (2D-only): N-D tuple axis.
## SumSmallest -- sum of k smallest entries
#' Sum of k smallest entries
#'
#' @param x An Expression
#' @param k Number of smallest entries to sum
#' @param axis NULL (all entries), 1 (row-wise), or 2 (column-wise)
#' @param keepdims Logical; keep the reduced dimension as size 1
#' @returns An Expression equal to -SumLargest(-x, k)
#' @export
sum_smallest <- function(x, k, axis = NULL, keepdims = FALSE) {
-SumLargest(-as_expr(x), k, axis = axis, keepdims = keepdims)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.