Skip to content

[Request]: Sugar for pow(int/double/IntegerVector/NumericVector x, IntegerVector/NumericVector z) #572

Description

@kendonB

Currently, it seems that only int z and double z work.

These, for example, would work:

// [[Rcpp::export]]
NumericVector pow_fails_double_vector(double x, NumericVector z) {
  return pow(x, z);
}

// This would do element-wise pow, as in R
// [[Rcpp::export]]
NumericVector pow_fails_vector_vector(NumericVector x, NumericVector z) {
  return pow(x, z);
}

Is making sugar functions for more classes hard? Is there a resource to help with creating them?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions