dmlc / dlpack

common in-memory tensor structure
https://dmlc.github.io/dlpack/latest
Apache License 2.0
911 stars 133 forks source link

Smaller fixups for "versioned" struct/docs and clarifications #145

Open seberg opened 6 months ago

seberg commented 6 months ago

When implementing things for NumPy, I noticed a few things:

On the Python side, copy=True and espeically copy=None behavior could be clarified. I did the lazy path in NumPy and just always copied with copy=True. In very rare cases that might make an array exportable, which isn't without copy=True (due to odd strides).

It may make sense to clarify that copy=None is only required to do copies to make device requests work (if they are supported).