動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
scipy v0.19.1
geopandas v0.3.0
MATLAB R2017b (Home Edition)
ADDA v.1.3b6
gnustep-gui-runtime v0.24.0-3.1
if asDict==True:
上記をpep8コマンドでチェックすると
Mie.py:476:16: E712 comparison to True should be 'if cond is True:' or 'if cond:'
isはオブジェクトの同一性の確認だったかと思うが、この場合は==
でなくis
の方にすべき、というのは正しいのだろうか?
以下を見つけた。
https://github.com/PyCQA/pycodestyle/issues/696
==
をis
に変更して動かなくなる例
answered Sep 25 '13 at 6:50
Martijn Pieters♦
That's because SQLAlchemy filters are one of the few places where == False
actually makes sense. Everywhere else you should not use it.
PEP8 E712の通りに変更すると動かなくなる場合もありそう。
link
その他、==
とis
の違いについての記事
https://qiita.com/search?utf8=%E2%9C%93&sort=&q=Python+title%3Ais