def test_floor(): b = numpy.random.random((2, 3)) a = afnumpy.array(b) iassert(afnumpy.floor(a), numpy.floor(b)) b = numpy.array([1, 2, 3]) a = afnumpy.array(b) iassert(afnumpy.floor(a), numpy.floor(b))
def test_floor(): b = numpy.random.random((2,3)) a = afnumpy.array(b) iassert(afnumpy.floor(a), numpy.floor(b)) b = numpy.array([1,2,3]) a = afnumpy.array(b) iassert(afnumpy.floor(a), numpy.floor(b))
def __mod__(self, other): a = self / other if numpy.issubdtype(a.dtype, numpy.float): out = self - afnumpy.floor(self / other) * other else: out = self - a * other # out.d_array.eval() arrayfire.backend.get().af_eval(out.d_array.arr) return out
def __rmod__(self, other): return other - afnumpy.floor(other / self) * self