This repository was archived by the owner on Jan 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ namespace x {
113113 };
114114} // namespace x
115115
116- tensor_i::ptr_type EWBinOp::op (EWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object b)
116+ tensor_i::ptr_type EWBinOp::op (EWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object & b)
117117{
118118 auto bb = x::mk_tx (b);
119119 return TypeDispatch<x::EWBinOp>(a, bb, op);
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ namespace x {
6262 };
6363} // namespace x
6464
65- void IEWBinOp::op (IEWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object b)
65+ void IEWBinOp::op (IEWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object & b)
6666{
6767 auto bb = x::mk_tx (b);
6868 TypeDispatch<x::IEWBinOp>(a, bb, op);
Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ struct Creator
1515
1616struct IEWBinOp
1717{
18- static void op (IEWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object b);
18+ static void op (IEWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object & b);
1919};
2020
2121struct EWBinOp
2222{
23- static tensor_i::ptr_type op (EWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object b);
23+ static tensor_i::ptr_type op (EWBinOpId op, x::DPTensorBaseX::ptr_type a, py::object & b);
2424};
2525
2626struct EWUnyOp
Original file line number Diff line number Diff line change @@ -271,12 +271,12 @@ namespace x
271271
272272 static DPTensorBaseX::ptr_type mk_tx (py::object & b)
273273 {
274- if (py::isinstance<x:: DPTensorBaseX::ptr_type >(b)) {
275- return b.cast <x:: DPTensorBaseX::ptr_type>();
274+ if (py::isinstance<DPTensorBaseX>(b)) {
275+ return b.cast <DPTensorBaseX::ptr_type>();
276276 } else if (py::isinstance<py::float_>(b)) {
277- return x:: operatorx<double >::mk_tx (b);
277+ return operatorx<double >::mk_tx (b);
278278 } else if (py::isinstance<py::int_>(b)) {
279- return x:: operatorx<int64_t >::mk_tx (b);
279+ return operatorx<int64_t >::mk_tx (b);
280280 }
281281 throw std::runtime_error (" Invalid right operand to elementwise binary operation" );
282282 };
You can’t perform that action at this time.
0 commit comments