Skip to main content

count

Function count 

Source
pub fn count<D: Dimension>(
    a: &StringArray<D>,
    sub: &str,
) -> FerrayResult<Array<i64, D>>
Expand description

Count non-overlapping occurrences of sub in each string element.

Returns an Array<i64, D> preserving the input shape. numpy’s count ufunc writes a signed npy_intp (int64) result, so the element type is signed i64.

§Errors

Returns an error if the internal array construction fails.