>>>np.count_nonzero(array) # 优点:语义化;等价 sum(array)
#
>>>np.random.choice(some_array, sample_size)
>>>np.append(array_1, value)
>>>np.append(array_1, array_2) # same dtype
>>>t.where(array_of_bool_values) # return table
# with only the rows of t for which
# the corresponding bool is True.
[python]data8Week5.13
于 2023-12-02 02:00:38 首次发布