File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 55
66namespace torch ::utils {
77
8- PyObject* tensor_to_numpy (const at::Tensor& tensor, bool force = false );
9- at::Tensor tensor_from_numpy (PyObject* obj, bool warn_if_not_writeable = true );
8+ TORCH_API PyObject* tensor_to_numpy (
9+ const at::Tensor& tensor,
10+ bool force = false );
1011
11- int aten_to_numpy_dtype (const at::ScalarType scalar_type);
12- at::ScalarType numpy_dtype_to_aten (int dtype);
12+ TORCH_API at::Tensor tensor_from_numpy (
13+ PyObject* obj,
14+ bool warn_if_not_writeable = true );
1315
14- bool is_numpy_available ();
15- bool is_numpy_int (PyObject* obj);
16- bool is_numpy_bool (PyObject* obj);
17- bool is_numpy_scalar (PyObject* obj);
16+ TORCH_API int aten_to_numpy_dtype (const at::ScalarType scalar_type);
17+ TORCH_API at::ScalarType numpy_dtype_to_aten (int dtype);
18+
19+ TORCH_API bool is_numpy_available ();
20+ TORCH_API bool is_numpy_int (PyObject* obj);
21+ TORCH_API bool is_numpy_bool (PyObject* obj);
22+ TORCH_API bool is_numpy_scalar (PyObject* obj);
1823
1924void warn_numpy_not_writeable ();
2025at::Tensor tensor_from_cuda_array_interface (PyObject* obj);
You can’t perform that action at this time.
0 commit comments