def binary_and(a,b):
"""Compare two binary arrays of the same length and return a third one,
the bitwise addition of the first two."""
# return np.logical_and(a,b) # does not work with packed arrays
return np.bitwise_and(a, b)
评论列表
文章目录