Skip to content

Commit

Permalink
Copy treatment on 0-size arrays from Python docs (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang authored Dec 13, 2023
1 parent ca4d00a commit 2a7e9f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/dlpack/dlpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ typedef struct {
* return size;
* }
* \endcode
*
* Note that if the tensor is of size zero, then the data pointer should be
* set to `NULL`.
*/
void* data;
/*! \brief The device of the tensor */
Expand Down

0 comments on commit 2a7e9f1

Please sign in to comment.