[TF-numpy] Adds an accessor class for numpy_ops, in order to be tf_exported'ed.

PiperOrigin-RevId: 317764327
Change-Id: I7af7e421c89b0c754e836a2a84cb67a1a82687a1
This commit is contained in:
Peng Wang 2020-06-22 17:00:43 -07:00 committed by TensorFlower Gardener
parent 23e387975e
commit 3cc9264e30
2 changed files with 0 additions and 33 deletions

View File

@ -11,7 +11,6 @@ py_library(
name = "numpy",
srcs = [
"__init__.py",
"np_accessor.py",
"np_array_ops.py",
"np_arrays.py",
"np_dtypes.py",

View File

@ -1,32 +0,0 @@
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""An accessor class for numpy_ops contents."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.ops import numpy_ops
class Numpy:
"""An accessor class that forwards attribute accesses to module `numpy_ops`.
"""
def __getattr__(self, attr):
return getattr(numpy_ops, attr)
numpy = Numpy()