As noted, since it isn't possible to inherit from std::complex (without errors), a common implementation hack is to wrap a member value. However, as written, though xtensor and xarray can use these wrappers, it seems there is no way to get the underlying data to be used when calling the routines here? e.g. potrf on the custom array should call .data() or something... Is this something which can be fixed easily / at all short of reworking to another library?