dpnp.extract

dpnp.extract(condition, x)[source]

Return the elements of an array that satisfy some condition.

For full documentation refer to numpy.extract.

Returns:

out -- Rank 1 array of values from x where condition is True.

Return type:

dpnp.ndarray

Limitations

Parameters condition and x are supported either as dpnp.ndarray or dpctl.tensor.usm_ndarray. Parameter x must be the same shape as condition. Otherwise the function will be executed sequentially on CPU.