You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to print the real(or imag) part of a complex xarray to cout, it crashes and prints nothing:
#include<iostream>
#include<complex>usingnamespacestd;
#include"xtensor/xarray.hpp"
#include"xtensor/xcomplex.hpp"
#include"xtensor/xio.hpp"typedef std::complex<double> cpx;
intmain()
{
// bug present only with xarray; everything's fine for xtensor
xt::xarray<std::complex<double>> U = {
{cpx(1, 2), cpx(3, 4)},
{cpx(5, 6), cpx(7, 8)}
};
cout << "hello" << endl; // not printed either
cout << xt::real(U) << endl; // nothing is printedreturn0;
}
After compiling and run on my computer, nothing is printed, not even the first line, indicating that cout<<xt::real(U)<<endl has crashed the whole program silently.
This bug only happens for xarray; when I replace xarray with xtensor, it works.
Environment
My dev environment is Windows, mingw-w64 8.1.0, running on a Intel i7 CPU.
The text was updated successfully, but these errors were encountered:
Behaviour
When I try to print the real(or imag) part of a complex xarray to cout, it crashes and prints nothing:
After compiling and run on my computer, nothing is printed, not even the first line, indicating that
cout<<xt::real(U)<<endl
has crashed the whole program silently.This bug only happens for
xarray
; when I replacexarray
withxtensor
, it works.Environment
My dev environment is Windows, mingw-w64 8.1.0, running on a Intel i7 CPU.
The text was updated successfully, but these errors were encountered: