Skip to content

Commit 7f1a3fd

Browse files
committed
DOCS: Updating documentation for replace.
1 parent 9066af5 commit 7f1a3fd

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

docs/details/data.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ array/value is selected.
338338

339339
\brief Replace elements of an array based on an conditional array
340340

341-
If the condition array has an element as true, then the element is
342-
replaced by the array/value, otherwise no change.
341+
- Input values are retained when corresponding elements from condition array are true.
342+
- Input values are replaced when corresponding elements from condition array are false.
343343

344344
\ingroup manip_mat
345345
\ingroup arrayfire_func

include/af/data.h

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,11 @@ namespace af
517517

518518
#if AF_API_VERSION >= 31
519519
/**
520-
\param[inout] a is the array whose values are replaced with values from \p b when \p cond is false
521-
\param[in] cond is the conditional array
522-
\param[in] b is the array containing elements which replace elements in \p a when \p cond is false
520+
\param[inout] a is the input array
521+
\param[in] cond is the conditional array.
522+
\param[in] b is the replacement array.
523+
524+
\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.
523525
524526
\ingroup data_func_replace
525527
*/
@@ -528,9 +530,11 @@ namespace af
528530

529531
#if AF_API_VERSION >= 31
530532
/**
531-
\param[inout] a is the array whose values are replaced with values from \p b when \p cond is false
532-
\param[in] cond is the conditional array
533-
\param[in] b is value that replaces elements in \p a when \p cond is false
533+
\param[inout] a is the input array
534+
\param[in] cond is the conditional array.
535+
\param[in] b is the replacement value.
536+
537+
\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.
534538
535539
\ingroup data_func_replace
536540
*/
@@ -836,9 +840,11 @@ extern "C" {
836840

837841
#if AF_API_VERSION >= 31
838842
/**
839-
\param[inout] a is the array whose values are replaced by \p b when \p cond is false
840-
\param[in] cond is the conditional array
841-
\param[in] b is the array containing elements that replaces elements of a where \p cond is false
843+
\param[inout] a is the input array
844+
\param[in] cond is the conditional array.
845+
\param[in] b is the replacement array.
846+
847+
\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.
842848
843849
\ingroup data_func_replace
844850
*/
@@ -847,9 +853,11 @@ extern "C" {
847853

848854
#if AF_API_VERSION >= 31
849855
/**
850-
\param[inout] a is the array whose values are replaced by \p b when \p cond is false
851-
\param[in] cond is the conditional array
852-
\param[in] b is the scalar that replaces the false parts of \p a
856+
\param[inout] a is the input array
857+
\param[in] cond is the conditional array.
858+
\param[in] b is the replacement array.
859+
860+
\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.
853861
854862
\ingroup data_func_replace
855863
*/

0 commit comments

Comments
 (0)