Commit 584e371c authored by Philipp  Trunschke's avatar Philipp Trunschke
Browse files

bugfix

parent 325e579a
Pipeline #2153 failed with stages
in 4 minutes and 17 seconds
......@@ -3,7 +3,7 @@
void expose_ttnetwork(module& m) {
class_<TTTensor, TensorNetwork>(m, "TTTensor")
.def(pickle(
[](const TTTensor &_self) { // __getstate__
[](const TTTensor& _self) { // __getstate__
return bytes(misc::serialize(_self));
},
[](bytes _bytes) { // __setstate__
......@@ -11,7 +11,7 @@ void expose_ttnetwork(module& m) {
}
))
.def(init<>(), "constructs an empty TTTensor")
.def(init<const TTTensor &>())
.def(init<const TTTensor&>())
.def(init<const Tensor&>())
.def(init<const Tensor&, value_t>())
.def(init<const Tensor&, value_t, size_t>())
......@@ -80,11 +80,11 @@ void expose_ttnetwork(module& m) {
class_<TTOperator, TensorNetwork>(m, "TTOperator")
.def(pickle(
[](const TTTensor &_self) { // __getstate__
[](const TTOperator& _self) { // __getstate__
return bytes(misc::serialize(_self));
},
[](bytes _bytes) { // __setstate__
return misc::deserialize<TTTensor>(_bytes);
return misc::deserialize<TTOperator>(_bytes);
}
))
.def(init<const Tensor&>())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment