Skip to content

Copy semantic consistency not match the documents #2812

Description

@blknit

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}}
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions