From a7460c21c072b538641c05d654f0b93535d7ffdc 2012-07-21 06:12:23 From: MinRK Date: 2012-07-21 06:12:23 Subject: [PATCH] catch NotImplementedError when using isnan in test old numpy raises this rather than TypeError on inappropriate dtypes --- diff --git a/IPython/zmq/tests/test_serialize.py b/IPython/zmq/tests/test_serialize.py index 2a1a33a..c632164 100644 --- a/IPython/zmq/tests/test_serialize.py +++ b/IPython/zmq/tests/test_serialize.py @@ -87,7 +87,7 @@ def _scrub_nan(A): for field in A.dtype.fields.keys(): try: A[field][numpy.isnan(A[field])] = 0 - except TypeError: + except (TypeError, NotImplementedError): # e.g. str dtype pass