Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
rok-cesnovar committed Jan 14, 2021
1 parent 8890dc5 commit c3226b0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions stan/math/prim/fun/linspaced_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace math {
/**
* Return an array of linearly spaced elements.
*
* This produces an array from low to high (included) with elements spaced
* This produces an array from low to high (inclusive) with elements spaced
* as (high - low) / (K - 1). For K=1, the array will contain the high value;
* for K=0 it returns an empty array.
*
Expand All @@ -23,7 +23,7 @@ namespace math {
* @throw std::domain_error if K is negative, if low is nan or infinite,
* if high is nan or infinite, or if high is less than low.
*/
inline std::vector<double> linspaced_array(int K, double low, double high) {
inline std::vector<int> linspaced_array(int K, double low, double high) {
static const char* function = "linspaced_array";
check_nonnegative(function, "size", K);
check_finite(function, "low", low);
Expand Down
5 changes: 2 additions & 3 deletions stan/math/prim/fun/linspaced_int_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace math {
/**
* Return an array of linearly spaced integers.
*
* This produces an array from low to high (included) with integers spaced
* This produces an array from low to high (inclusive) with integers spaced
* as (high - low) / (K - 1). For K=1, the array will contain the high value;
* for K=0 it returns an empty array.
*
Expand All @@ -20,8 +20,7 @@ namespace math {
* @param high largest value
* @return An array of size K with elements linearly spaced between
* low and high.
* @throw std::domain_error if K is negative, if high is less than low
* or if ().
* @throw std::domain_error if K is negative or high is less than low.
*/
inline std::vector<double> linspaced_int_array(int K, int low, int high) {
static const char* function = "linspaced_int_array";
Expand Down
2 changes: 1 addition & 1 deletion stan/math/prim/fun/linspaced_row_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace math {
/**
* Return a row vector of linearly spaced elements.
*
* This produces a row vector from low to high (included) with elements spaced
* This produces a row vector from low to high (inclusive) with elements spaced
* as (high - low) / (K - 1). For K=1, the vector will contain the high value;
* for K=0 it returns an empty vector.
*
Expand Down
2 changes: 1 addition & 1 deletion stan/math/prim/fun/linspaced_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace math {
/**
* Return a vector of linearly spaced elements.
*
* This produces a vector from low to high (included) with elements spaced
* This produces a vector from low to high (inclusive) with elements spaced
* as (high - low) / (K - 1). For K=1, the vector will contain the high value;
* for K=0 it returns an empty vector.
*
Expand Down

0 comments on commit c3226b0

Please sign in to comment.