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''

Python2.7を使っていて出たエラー。

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''


Nを2乗するときに、最近RとPythonを行き来していたので、N**2 とすべきところを N^2 としていたのが原因でした。Rとぐちゃぐちゃになっていました。

エラーメッセージの原因が全部**と^の間違いとは限らないけれど
確認してみてください。

コメント

このブログの人気の投稿

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

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