Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
派手な方法はありますか
n = [x-t if x > 0 else x for x in nps]
これに似ている
n = np.array(a) n[np.abs(n) < t] = 0
このようなものでしょうか?
n[n > 0] = n-t