Document Tensor storage contracts and NumPy differences - #56291
Open
tannergooding wants to merge 1 commit into
Open
tannergooding wants to merge 1 commit into
tannergooding wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The release placement remains unconfirmed while the associated runtime change is unmerged.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Documents Tensor shape and storage contracts, NumPy differences, and related breaking changes.
Changes:
- Adds conceptual Tensor guidance and migration examples.
- Documents storage-layout validation changes.
- Adds overview and navigation links.
| File | Description |
|---|---|
docs/standard/tensor-shapes-and-storage.md |
Adds Tensor guidance. |
docs/standard/numerics.md |
Links the new guide. |
docs/fundamentals/toc.yml |
Adds fundamentals navigation. |
docs/core/compatibility/toc.yml |
Adds .NET 12 navigation. |
docs/core/compatibility/core-libraries/12/tensor-storage-layout-validation.md |
Documents the breaking change. |
docs/core/compatibility/12.md |
Adds the .NET 12 index. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
gewarren
approved these changes
Oct 2, 2026
Comment on lines
+85
to
+88
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo*>. | ||
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.FlattenTo*>. | ||
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo*>. | ||
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.TryFlattenTo*>. |
Collaborator
There was a problem hiding this comment.
Suggested change
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo*>. | |
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.FlattenTo*>. | |
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo*>. | |
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.TryFlattenTo*>. | |
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo*?displayProperty=fullName>. | |
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.FlattenTo*?displayProperty=fullName>. | |
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo*?displayProperty=fullName>. | |
| - <xref:System.Numerics.Tensors.IReadOnlyTensor`2.TryFlattenTo*?displayProperty=fullName>. |
Comment on lines
+91
to
+93
| - <xref:System.Numerics.Tensors.Tensor.ResizeTo*> (all overloads). | ||
| - <xref:System.Numerics.Tensors.Tensor.Reverse*> and <xref:System.Numerics.Tensors.Tensor.ReverseDimension*> (overloads that take a destination). | ||
| - <xref:System.Numerics.Tensors.Tensor.Concatenate*> (overload that takes a destination). |
Collaborator
There was a problem hiding this comment.
Suggested change
| - <xref:System.Numerics.Tensors.Tensor.ResizeTo*> (all overloads). | |
| - <xref:System.Numerics.Tensors.Tensor.Reverse*> and <xref:System.Numerics.Tensors.Tensor.ReverseDimension*> (overloads that take a destination). | |
| - <xref:System.Numerics.Tensors.Tensor.Concatenate*> (overload that takes a destination). | |
| - <xref:System.Numerics.Tensors.Tensor.ResizeTo*?displayProperty=fullName> (all overloads). | |
| - <xref:System.Numerics.Tensors.Tensor.Reverse*?displayProperty=fullName> and <xref:System.Numerics.Tensors.Tensor.ReverseDimension*?displayProperty=fullName> (overloads that take a destination). | |
| - <xref:System.Numerics.Tensors.Tensor.Concatenate*?displayProperty=fullName> (overload that takes a destination). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Document the Tensor storage contracts and intentional NumPy differences introduced or clarified by dotnet/runtime#134914:
This PR is intended to merge alongside the runtime PR. The version helper currently reports .NET 12 Preview 1; the runtime PR has not merged yet, so release placement needs confirmation before merge. This PR covers conceptual and compatibility documentation; API-reference XML belongs to the separate dotnet/dotnet-api-docs repository.
Content sources
The conceptual shape, squeeze, reversal, resize, and empty-stride explanations are adapted from the runtime Tensor README. The overlap table and migration guidance are adapted from the implementation and revised
IReadOnlyTensor<TSelf, T>contract. The compatibility article is adapted from #56290. Examples, navigation entries, and the .NET 12 index are newly generated. Please review the operation-specific contracts and release placement.Validation
Markdownlint reports no issues across all four changed articles. Relative Markdown links and 17 Tensor API cross-references resolve against the source files and API-reference XML.
Built and ran the examples against the accepted runtime implementation at
c431dcd84450420a08e07edf94c3be3ecf5988a6:[3, 4, 1, 2][1, 2, 4, 5][1, 2, 4, 5]ArgumentException; backing storage remains[1, 2, 3, 4, 5, 6]OpenPublishing validation will run on this PR.
Resolves #56290
Note
This pull request was generated with GitHub Copilot.
Internal previews
Build report