Skip to content

Commit

Permalink
Update performance docs to use copy=False
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Mar 12, 2020
1 parent cc35ea6 commit 0beca2d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/tutorials/PerformanceCliffordTutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
"outputs": [],
"source": [
"def apply_rotor_faster(R,mv):\n",
" return layout.MultiVector(layout.gmt_func(R.value,layout.gmt_func(mv.value,layout.adjoint_func(R.value))) )"
" return layout.MultiVector(layout.gmt_func(R.value,layout.gmt_func(mv.value,layout.adjoint_func(R.value))), copy=False)"
]
},
{
Expand Down Expand Up @@ -253,7 +253,7 @@
" return gmt_func(R_val,gmt_func(mv_val,adjoint_func(R_val)))\n",
"\n",
"def apply_rotor_wrapped(R,mv):\n",
" return cf.MultiVector(layout,apply_rotor_val(R.value,mv.value))"
" return layout.MultiVector(apply_rotor_val(R.value, mv.value), copy=False)"
]
},
{
Expand Down Expand Up @@ -312,7 +312,7 @@
" return gmt_func(R_val,gmt_func(mv_val,adjoint_func(R_val)))\n",
"\n",
"def apply_rotor_wrapped_numba(R,mv):\n",
" return cf.MultiVector(layout,apply_rotor_val_numba(R.value,mv.value))"
" return layout.MultiVector(apply_rotor_val_numba(R.value,mv.value), copy=False)"
]
},
{
Expand Down Expand Up @@ -374,7 +374,7 @@
" return -dual_val( omt_func( dual_val(mv_a_val) , dual_val(mv_b_val)) )\n",
"\n",
"def meet_wrapped(mv_a,mv_b):\n",
" return cf.layout.MultiVector(meet_val(mv_a.value, mv_b.value))\n",
" return layout.MultiVector(meet_val(mv_a.value, mv_b.value), copy=False)\n",
"\n",
"sphere = (up(0)^up(e1)^up(e2)^up(e3)).normal()\n",
"print(sphere.meet(line_one).normal().normal())\n",
Expand Down Expand Up @@ -555,7 +555,7 @@
" return left_rotor_mult(R_val,right_rotor_mult(mv_val,adjoint_func(R_val)))\n",
"\n",
"def sparse_apply_rotor(R,mv):\n",
" return cf.MultiVector(layout,sparse_apply_rotor_val(R.value,mv.value))"
" return layout.MultiVector(sparse_apply_rotor_val(R.value, mv.value), copy=False)"
]
},
{
Expand Down Expand Up @@ -619,7 +619,7 @@
" return -dual_sparse_val( sparse_omt_2_1( dual_sparse_val(mv_a_val) , dual_sparse_val(mv_b_val)) )\n",
"\n",
"def meet_sparse_3_4(mv_a,mv_b):\n",
" return cf.layout.MultiVector(meet_sparse_3_4_val(mv_a.value, mv_b.value))\n",
" return layout.MultiVector(meet_sparse_3_4_val(mv_a.value, mv_b.value), copy=False)\n",
"\n",
"print(sphere.meet(line_one).normal().normal())\n",
"print(meet_sparse_3_4(line_one,sphere).normal())"
Expand Down

0 comments on commit 0beca2d

Please sign in to comment.