Failing lax_numpy_indexing_test.py tests on Python 3.7
`python tests/lax_numpy_indexing_test.py --num_generated_cases=1` on Python 3.7 (fresh Anaconda install on a macOS). Numpy version 1.15.4.
diff --git a/jax/numpy/lax_numpy.py b/jax/numpy/lax_numpy.py
index ef34e02f4..2f676424d 100644
--- a/jax/numpy/lax_numpy.py
+++ b/jax/numpy/lax_numpy.py
@@ -1592,8 +1592,8 @@ def _rewriting_take(arr, idx, axis=0):
       axis += isinstance(elt, slice)   # advance axis index if not eliminated
     unexpanded_shape_itr = iter(result.shape)
     result_shape = tuple(1 if elt is None else next(unexpanded_shape_itr)
-                         for elt in canonical_idx if not isinstance(elt, int))
-    return lax.reshape(result, result_shape)
+                         for elt in canonical_idx if isinstance(elt, (type(None), slice)))
+    return lax.reshape(result, result_shape) if result_shape else result
 
   # Handle advanced indexing (non-tuple sequence, ndarray of dtype int or bool,
   # or a tuple with at least one sequence object).
['jax/numpy/lax_numpy.py']