Returns the element at position index in the storage.
Returns the element at position index in the storage. Valid range of index is 0 to length() -1
Convert the storage to an array
Convert the storage to an array
Copy another storage.
Copy another storage. The types of the two storages might be different: in that case a conversion of types occur (which might result, of course, in loss of precision or rounding). This method returns itself.
Fill the Storage with the given value.
Fill the Storage with the given value. This method returns itself.
offset start from 1
length of fill part
Returns the number of elements in the storage.
Returns the number of elements in the storage. The original method name in torch is size, which is conflict with Iterable
Resize the storage to the provided size.
Resize the storage to the provided size. The new contents are undetermined. This function returns itself
Share the same underlying storage
Share the same underlying storage
Set the element at position index in the storage.
Set the element at position index in the storage. Valid range of index is 1 to length()
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Returns the number of elements in the storage.
Returns the number of elements in the storage. Override size
in Iterable, which will cause
some full gc and performance issues.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Storage defines a simple storage interface that controls the underlying storage for any tensor object.