Should IPyBuffer
support Memory<T>
and therefore Tensor<T>
?
#471
Unanswered
tonybaloney
asked this question in
Q&A
Replies: 1 comment
-
See #504 where I've laid some concerns with the existing API and a proposal in #505 that also demonstrates how |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When looking at the new MEAI Embedding, the constructor takes
ReadOnlyMemory
.When a method returns a PyBuffer which contains a vector of single, double or other vector type creating an
Embedding<T>
requires copying the values to an array then creating an Embedding from that array.AsMemory<T>
methods forPyBuffer
?https://learn.microsoft.com/en-us/dotnet/standard/memory-and-spans/memory-t-usage-guidelines
See example
Beta Was this translation helpful? Give feedback.
All reactions