提交 ea48bc28 authored 作者: Frederic's avatar Frederic

update comments following code review.

上级 d8db448d
...@@ -2830,7 +2830,7 @@ def ceil_intdiv(a, b): ...@@ -2830,7 +2830,7 @@ def ceil_intdiv(a, b):
Works for all dtypes, but mostly useful when a and b are int. Works for all dtypes, but mostly useful when a and b are int.
""" """
# If a and b are int with not many significant bits, we could # If a and b are int with not many significant bits, we could
# cast them to float to avoid doing the module. We do not know if this # cast them to float to avoid doing the modulo. We do not know if this
# is faster or not. But this is not safe for int64 as the cast will # is faster or not. But this is not safe for int64 as the cast will
# lose precision. # lose precision.
# e.g.: cast(cast(a, scalar.upcast(a, 'float32')) / b, scal.upcast(a, b)) # e.g.: cast(cast(a, scalar.upcast(a, 'float32')) / b, scal.upcast(a, b))
......
...@@ -553,8 +553,6 @@ def copymod(dct, without=[], **kwargs): ...@@ -553,8 +553,6 @@ def copymod(dct, without=[], **kwargs):
rval[kw] = val rval[kw] = val
return rval return rval
# We can't have both input as interger as we need the output
# to have the same dtype to work inplace.
_good_broadcast_div_mod_normal_float_no_complex = dict( _good_broadcast_div_mod_normal_float_no_complex = dict(
same_shapes=(rand(2, 3), rand(2, 3)), same_shapes=(rand(2, 3), rand(2, 3)),
scalar=(rand(2, 3), rand(1, 1)), scalar=(rand(2, 3), rand(1, 1)),
...@@ -563,10 +561,11 @@ _good_broadcast_div_mod_normal_float_no_complex = dict( ...@@ -563,10 +561,11 @@ _good_broadcast_div_mod_normal_float_no_complex = dict(
dtype_mixup_1=(rand(2, 3), randint_nonzero(2, 3)), dtype_mixup_1=(rand(2, 3), randint_nonzero(2, 3)),
dtype_mixup_2=(randint_nonzero(2, 3), rand(2, 3)), dtype_mixup_2=(randint_nonzero(2, 3), rand(2, 3)),
# Fix problem with integers and uintegers and add them. # Fix problem with integers and uintegers and add them.
# Them remove there specific addition to CeilIntDivTester tests. # Them remove their specific addition to CeilIntDivTester tests.
# integer=(randint(2, 3), randint_nonzero(2, 3)), # integer=(randint(2, 3), randint_nonzero(2, 3)),
# uinteger=(randint(2, 3).astype("uint8"), # uinteger=(randint(2, 3).astype("uint8"),
# randint_nonzero(2, 3).astype("uint8")), # randint_nonzero(2, 3).astype("uint8")),
# This empty2 doesn't work for some tests. I don't remember why
#empty2=(numpy.asarray([0]), numpy.asarray([])), #empty2=(numpy.asarray([0]), numpy.asarray([])),
) )
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论