Skip to content

Commit

Permalink
Fix tensor_simple label ordering in Rust and C++ to match Python (#…
Browse files Browse the repository at this point in the history
…4035)

### What

The label ordering was inverted in the C++ and Rust version of
`tensor_simple`, compared to Python.

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/4035) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4035)
- [Docs
preview](https://rerun.io/preview/4dbc6b9bf35da4355b082f0b453cc0d5851aa5e8/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/4dbc6b9bf35da4355b082f0b453cc0d5851aa5e8/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
  • Loading branch information
abey79 authored Oct 27, 2023
1 parent c929c34 commit 689ac2c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/re_types/src/archetypes/tensor.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/code-examples/tensor_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ int main() {

rec.log(
"tensor",
rerun::Tensor({8, 6, 3, 5}, data).with_dim_names({"batch", "channel", "height", "width"})
rerun::Tensor({8, 6, 3, 5}, data).with_dim_names({"width", "height", "channel", "batch"})
);
}
2 changes: 1 addition & 1 deletion docs/code-examples/tensor_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
data.map_inplace(|x| *x = rand::random());

let tensor =
rerun::Tensor::try_from(data)?.with_dim_names(["batch", "channel", "height", "width"]);
rerun::Tensor::try_from(data)?.with_dim_names(["width", "height", "channel", "batch"]);
rec.log("tensor", &tensor)?;

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion rerun_cpp/src/rerun/archetypes/tensor.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 689ac2c

Please sign in to comment.