提交 3cc9264e 编写于 作者: P Peng Wang 提交者: TensorFlower Gardener

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

PiperOrigin-RevId: 317764327
Change-Id: I7af7e421c89b0c754e836a2a84cb67a1a82687a1
上级 23e38797
......@@ -11,7 +11,6 @@ py_library(
name = "numpy",
srcs = [
"__init__.py",
"np_accessor.py",
"np_array_ops.py",
"np_arrays.py",
"np_dtypes.py",
......
# 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()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册