Skip to content

docs(nalgebra-sparse): clarify required features for front-page example - #1606

Open
wilmerdooley wants to merge 1 commit into
dimforge:mainfrom
wilmerdooley:oss/issue-1214
Open

docs(nalgebra-sparse): clarify required features for front-page example#1606
wilmerdooley wants to merge 1 commit into
dimforge:mainfrom
wilmerdooley:oss/issue-1214

Conversation

@wilmerdooley

Copy link
Copy Markdown

The front-page example in nalgebra-sparse uses matrixcompare to assert that the sparse and dense matrices agree, but the surrounding documentation did not mention the compare feature on nalgebra and nalgebra-sparse that this example needs. Without those features, new users copy-pasting the example will hit unresolved imports, which has been a source of confusion.

This change adds a short note and a Cargo.toml snippet above the example in nalgebra-sparse/src/lib.rs so readers can see exactly which dependencies and features to enable.

Resolves #1214

Changes

  • Added a paragraph to the front-page example in nalgebra-sparse/src/lib.rs explaining that the compare feature is required on both nalgebra-sparse and nalgebra.
  • Added a Cargo.toml snippet showing the required dependencies and feature flags for the example to compile.

Signed-off-by: wilmerdooley <wilmerdooley1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify needed features for examples in nalgebra-sparse reference docs

1 participant