mars.tensor.not_equal¶
- mars.tensor.not_equal(x1, x2, out=None, where=None, **kwargs)[源代码]¶
Return (x1 != x2) element-wise.
- 参数
x1 (array_like) – Input tensors.
x2 (array_like) – Input tensors.
out (Tensor, None, or tuple of Tensor and None, optional) – A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated tensor is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs.
where (array_like, optional) – Values of True indicate to calculate the ufunc at that position, values of False indicate to leave the value in the output alone.
**kwargs –
- 返回
not_equal – For each element in x1, x2, return True if x1 is not equal to x2 and False otherwise.
- 返回类型
tensor bool, scalar bool
参见
实际案例
>>> import mars.tensor as mt
>>> mt.not_equal([1.,2.], [1., 3.]).execute() array([False, True]) >>> mt.not_equal([1, 2], [[1, 3],[1, 4]]).execute() array([[False, True], [False, True]])