mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Add itemsize and nbytes properties to Tensor (#98322)
Adds properties for itemsize and nbytes to Tensor matching the properties in NumPy. Fixes https://github.com/pytorch/pytorch/issues/12728 Pull Request resolved: https://github.com/pytorch/pytorch/pull/98322 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
14ccad73b4
commit
555ab310dc
@ -157,6 +157,8 @@ _SKIP_PYTHON_BINDINGS = [
|
||||
"_nested_view_from_buffer", # View only version of _nested_from_buffer. This will force users to only use the "safe" version.
|
||||
"_nested_view_from_buffer_copy",
|
||||
"_nested_view_from_buffer_copy_out",
|
||||
"nbytes",
|
||||
"itemsize",
|
||||
]
|
||||
|
||||
SKIP_PYTHON_BINDINGS = [
|
||||
|
Reference in New Issue
Block a user