Skip to content

Commit

Permalink
fix undef args func
Browse files Browse the repository at this point in the history
  • Loading branch information
j9263178 committed Dec 5, 2023
1 parent eccb0be commit cb9f24e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pybind/unitensor_py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,10 @@ void unitensor_binding(py::module &m) {
py::arg("low"), py::arg("high"), py::arg("seed")= -1)

.def("cfrom", [](UniTensor &self, const UniTensor &in, const bool &force, const cytnx_double &tol){
self.convert_from(in,force,tol);
if(self.uten_type() == UTenType.Block or self.uten_type() == UTenType.Sparse)
self.convert_from(in,force,tol);
else
self.convert_from(in,force);
},
py::arg("Tin"), py::arg("force") = false, py::arg("tol") = 1e-14)
.def("get_qindices", [](UniTensor &self, const cytnx_uint64 &bidx){return self.get_qindices(bidx);});
Expand Down
5 changes: 5 additions & 0 deletions src/UniTensor_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,5 +704,10 @@ namespace cytnx {
cytnx_error_msg(true, "[ERROR] fatal internal, cannot call on a un-initialize UniTensor_base%s",
"\n");

Check warning on line 705 in src/UniTensor_base.cpp

View check run for this annotation

Codecov / codecov/patch

src/UniTensor_base.cpp#L704-L705

Added lines #L704 - L705 were not covered by tests
}

void UniTensor_base::from_(const boost::intrusive_ptr<UniTensor_base> &rhs, const bool &force) {
cytnx_error_msg(true, "[ERROR] fatal internal, cannot call on a un-initialize UniTensor_base%s",
"\n");
}
} // namespace cytnx
#endif

0 comments on commit cb9f24e

Please sign in to comment.