Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy semantic consistency not match the documents #2812

Open
blknit opened this issue Oct 22, 2024 · 0 comments
Open

Copy semantic consistency not match the documents #2812

blknit opened this issue Oct 22, 2024 · 0 comments

Comments

@blknit
Copy link

blknit commented Oct 22, 2024

When I study xtensor with document https://xtensor.readthedocs.io/en/latest/scalar.html
The result of the following code not match the document, it is the same as result in "Assignment"
So there no different between assign and copy constructor?

`#include <xtensor/xarray.hpp>

xt::xarray a = {{0., 1., 2.}, {3., 4., 5.}};
double s = 1.2;
a = 1.2;
std::cout << a << std::endl;
// prints {{1.2, 1.2, 1.2}, {1.2, 1.2, 1.2}}
`

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

No branches or pull requests

1 participant