a = np.empty(3) * np.nan shareimprove this answer edited Mar 14 '14 at 20:45 answered Mar 14 '14 at 19:45 shx2 28.9k54679 Thanks for modify in place hint. That is what was confusing me. – tbc Mar 14 '14 at 20:32 add a comment up vote 23 down vote You could also try: In [79]: np.full(3, np.nan) Out

U1and0U1and0 のブックマーク 2016/12/05 10:27

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Best way to initialize and fill an numpy array?

    Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technolo...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう