Skip to content

Commit

Permalink
[swig] Review StringArray_API_extensions docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto.ferreira committed Mar 4, 2020
1 parent cd510d2 commit cd0a3fa
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions swig/StringArray_API_extensions.i
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,23 @@ class StringArray
delete reinterpret_cast<StringArray *>(handle);
}

/**
* Retrieve the number of strings in the StringArray.
*/
int StringArrayHandle_get_num_elements(StringArrayHandle handle)
{
return reinterpret_cast<StringArray *>(handle)->get_num_elements();
}



/**
* Wraps LGBM_BoosterGetEvalNamesSWIG.
*
* Wraps LGBM_BoosterGetEvalNames.
*
* In case of success a new StringArray is created and returned,
* which you're responsible for freeing,
* @see StringArrayHandle_free().
* In case of failure such resource is automatically freed.
*
* @param handle Booster handle
* @param eval_counts number of evaluations
* @param *strings [out] Pointer to ArrayStringHandle.
Expand Down Expand Up @@ -240,9 +247,12 @@ class StringArray


/**
* Wraps LGBM_BoosterGetFeatureNames.
*
* Allocates a new StringArray. You must free it yourself if it succeeds.
* @see StringArray_delete().
* If the underlying LGBM calls fail, memory is freed automatically.
* @see StringArrayHandle_free().
* If the underlying LGBM calls fail, memory is freed automatically,
* otherwise you're responsible for freeing it.
*/
int LGBM_BoosterGetFeatureNamesSWIG(BoosterHandle handle,
//int num_features,
Expand Down

0 comments on commit cd0a3fa

Please sign in to comment.