Make aten_to_numpy_dtype in tensor_numpy.h public. (#23943)

Summary:
The corresponding numpy_dtype_to_aten is public already so this
should be fine. Tests still pass.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23943

Differential Revision: D16690742

Pulled By: soumith

fbshipit-source-id: 81431a3316509cff8a9122e10e8f6a362bbcc9c0
This commit is contained in:
Heinrich Küttler
2019-08-15 11:51:24 -07:00
committed by Facebook Github Bot
parent 3574d9ff70
commit 32ed676b46
2 changed files with 2 additions and 3 deletions

View File

@ -70,8 +70,6 @@ static std::vector<int64_t> seq_to_aten_shape(PyObject *py_seq) {
return result;
}
static int aten_to_numpy_dtype(const ScalarType scalar_type);
PyObject* tensor_to_numpy(const at::Tensor& tensor) {
if (tensor.is_cuda()) {
throw TypeError(
@ -178,7 +176,7 @@ at::Tensor tensor_from_numpy(PyObject* obj) {
);
}
static int aten_to_numpy_dtype(const ScalarType scalar_type) {
int aten_to_numpy_dtype(const ScalarType scalar_type) {
switch (scalar_type) {
case kDouble: return NPY_DOUBLE;
case kFloat: return NPY_FLOAT;