numpy.arangeのエラー

配列を作るコマンド
numpy.arange(10.**(-6),10.**(-5),10.**(-6))
を使うと100000個の配列ができます。

本来なら99999個の配列になるはずなのですが。
出血大サービスしてくれます。困ります。

numpy.linspace(10.**(-6),10.**(-5),99999)で代用可能です。
他にも整数で1から99999まで作って10.**(-6)かけるという方法もあります。

コメント

このブログの人気の投稿

TypeError: ufunc 'bitwise_xor' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

overleafで画像が表示されない!

エラー: ""C:\U" で始まる文字列の中で 8 進文字なしに '\U' が使われています