Skip to content

Commit 94be739

Browse files
committed
Add a note on conversions between torch/tensorflow objects and numpy
1 parent 5b6cfe5 commit 94be739

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/blosc2/core.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,12 @@ def pack_tensor(
621621
The serialized version (cframe) of the array.
622622
If urlpath is provided, the number of bytes in file is returned instead.
623623
624+
Notes
625+
-----
626+
627+
In case you pass a TensorFlow/PyTorch tensor, the tensor will be converted to a NumPy array
628+
before being packed. The tensor will be restored to its original form when unpacked.
629+
624630
Examples
625631
--------
626632
>>> import numpy as np

0 commit comments

Comments
 (0)