Re: [問題] numpy array 一次選取兩行
其實可以結合zip和slicing,如下:
for checkin, checkout in zip(PT_record[0::2], PT_record[1::2]):
# do something
-----
Sent from JPTT on my iPhone
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.184.4.151
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1555944597.A.66D.html
推
04/22 22:57,
5年前
, 1F
04/22 22:57, 1F
推
04/22 23:02,
5年前
, 2F
04/22 23:02, 2F
推
04/22 23:20,
5年前
, 3F
04/22 23:20, 3F
推
04/23 06:34,
5年前
, 4F
04/23 06:34, 4F
討論串 (同標題文章)