{{alias}}( x, searchElement[, options] ) Tests whether an ndarray contains a specified value along one or more dimensions. Parameters ---------- x: ndarray Input ndarray. searchElement: ndarray|any Search element. Must be broadcast-compatible with the non-reduced dimensions of the input ndarray. Must have a data type which can be safely cast to the data type of the input ndarray. options: Object (optional) Function options. options.dims: Array (optional) List of dimensions over which to perform a reduction. If not provided, the function performs a reduction over all elements in a provided input ndarray. options.keepdims: boolean (optional) Boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions. Default: false. Returns ------- out: ndarray Output ndarray. When performing a reduction over all elements, the function returns a zero-dimensional ndarray containing the result. Examples -------- > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ); > var y = {{alias}}( x, 3.0 ) > y.get() true > y = {{alias}}( x, 3.0, { 'keepdims': true } ) > {{alias:@stdlib/ndarray/to-array}}( y ) [ [ true ] ] > y.get( 0, 0 ) true {{alias}}.assign( x, searchElement, y[, options] ) Tests whether an ndarray contains a specified value along one or more dimensions and assigns the results to a provided output ndarray. Parameters ---------- x: ndarray Input ndarray. searchElement: ndarray|any Search element. Must be broadcast-compatible with the non-reduced dimensions of the input ndarray. Must have a data type which can be safely cast to the data type of the input ndarray. y: ndarray Output ndarray. The output shape must match the shape of the non-reduced dimensions of the input ndarray. options: Object (optional) Function options. options.dims: Array (optional) List of dimensions over which to perform a reduction. If not provided, the function performs a reduction over all elements in a provided input ndarray. Returns ------- y: ndarray Output ndarray. Examples -------- > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ); > var y = {{alias:@stdlib/ndarray/from-scalar}}( false ); > var out = {{alias}}.assign( x, 3.0, y ) > var bool = ( out === y ) true > y.get() true See Also --------