def _coerce_dtype(self, other_dtype):
"""Possibly change the bin content type to allow correct operations with other operand.
Parameters
----------
other_dtype : np.dtype or type
"""
new_dtype = np.find_common_type([self.dtype, np.dtype(other_dtype)], [])
if new_dtype != self.dtype:
self.dtype = new_dtype
评论列表
文章目录