def _common_dtype(x, y):
"""Determines common numpy DTYPE for arrays."""
dtype = np.find_common_type([x.dtype, y.dtype], [])
if x.dtype != dtype: x = x.astype(dtype)
if y.dtype != dtype: y = y.astype(dtype)
return x, y
文章目录