Skip to content

Commit 97fbd00

Browse files
committed
Fix hpsi_func in pyabacus-dav_subspace
1 parent 889871e commit 97fbd00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyabacus/src/py_diago_dav_subspace.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class PyDiagoDavSubspace
118118
) {
119119
// Note: numpy's py::array_t is row-major, but
120120
// our raw pointer-array is column-major
121-
py::array_t<std::complex<double>, py::array::f_style> psi({ldPsi, band_index2 - band_index1 + 1});
121+
py::array_t<std::complex<double>, py::array::f_style> psi({ldPsi, nvec});
122122
py::buffer_info psi_buf = psi.request();
123123
std::complex<double>* psi_ptr = static_cast<std::complex<double>*>(psi_buf.ptr);
124124
std::copy(psi_in, psi_in + nvec * ldPsi, psi_ptr);

0 commit comments

Comments
 (0)