Finally got off my butt and hunted down an example, and it was right under
my nose in mplot3d.
lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py:1094:
FutureWarning: comparison to `None` will result in an elementwise
object comparison in the future.
if self.button_pressed in
On Sa, 2015-01-31 at 09:02 -0500, Benjamin Root wrote:
Finally got off my butt and hunted down an example, and it was right
under my nose in mplot3d.
lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py:1094:
FutureWarning: comparison to `None` will result in an elementwise object
Hi,
I just encountered the following in my code:
FutureWarning: comparison to `None` will result in an elementwise object
comparison in the future.
I'm very concerned about this. This is a very common programming pattern (lazy
loading):
class A(object):
def __init__(self):
On 2014/09/21, 11:10 AM, Demitri Muna wrote:
Hi,
I just encountered the following in my code:
FutureWarning: comparison to `None` will result in an elementwise object
comparison in the future.
I'm very concerned about this. This is a very common programming pattern
(lazy loading):
class
That being said, I do wonder about related situations where the lhs of the
equal sign might be an array, or it might be a None and you are comparing
against another numpy array. In those situations, you aren't trying to
compare against None, you are just checking if two objects are equivalent.
On Sep 21, 2014, at 5:19 PM, Eric Firing efir...@hawaii.edu wrote:
I think what you are missing is that the standard Python idiom for this
use case is if self._some_array is None:. This will continue to work,
regardless of whether the object being checked is an ndarray or any
other
On 22 Sep 2014 03:02, Demitri Muna demitri.m...@gmail.com wrote:
On Sep 21, 2014, at 5:19 PM, Eric Firing efir...@hawaii.edu wrote:
I think what you are missing is that the standard Python idiom for this
use case is if self._some_array is None:. This will continue to work,
regardless of