diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-10-03 10:51:56 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-03 11:00:07 -0700 |
commit | 0796d711f17c8c981d19461c9edd0e16837c8ab7 (patch) | |
tree | 2a16f361999e21ba49ce5e5e044942b9653cfe2a /tensorflow/python/feature_column | |
parent | 560624bff65b7b502da2c52f9b250d9181c4a3f7 (diff) |
Update _check_shape to accept six.integer_types instead of int
Currently _check_shape requires that a shape be an `int` or sequence of `int`s. This CL allows `six.integer_type`s so now (1L,) would be a valid shape.
PiperOrigin-RevId: 215589131
Diffstat (limited to 'tensorflow/python/feature_column')
-rw-r--r-- | tensorflow/python/feature_column/feature_column.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/feature_column/feature_column.py b/tensorflow/python/feature_column/feature_column.py index 618e70f3a5..5352796174 100644 --- a/tensorflow/python/feature_column/feature_column.py +++ b/tensorflow/python/feature_column/feature_column.py @@ -2829,7 +2829,7 @@ def _check_shape(shape, key): shape = [shape] shape = tuple(shape) for dimension in shape: - if not isinstance(dimension, int): + if not isinstance(dimension, six.integer_types): raise TypeError('shape dimensions must be integer. ' 'shape: {}, key: {}'.format(shape, key)) if dimension < 1: |