aesara.tensor.compress#
- aesara.tensor.compress(condition, x, axis=None)[source]#
Return selected slices of an array along given axis.
It returns the input tensor, but with selected slices along a given
axis
retained. If noaxis
is provided, the tensor is flattened. Corresponds tonumpy.compress
New in version 0.7.
- Parameters:
condition – One dimensional array of non-zero and zero values corresponding to indices of slices along a selected axis.
x – Input data, tensor variable.
axis – The axis along which to slice.
- Return type:
x
with selected slices.